-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] float marked as array allocation #33
Comments
Hi @Appleguysnake, |
Apparently not! I just tried to reproduce it and it seems the errors are always marked critical, I think the little icon just didn't pop up right away the first time I tested it. |
@Appleguysnake, Is it safe to close this issue then? |
No, being marked as critical was just an extra detail. The bug is that floats are not arrays so it shouldn't be flagging them as array allocations. |
Indeed they are all float but they are all packed together into an array. It's using Mathf.Min method with params keyword. It's an implicit array allocation. |
Ahhh okay I see now, thanks for explaining it. Perhaps there's a way to clarify the message in that case? |
The following code gives a critical array allocation warning for each line:
Moving the
0.5f
into a variable continues to give an error. Moving the variable outside the loop and changing it to a class constant still generates the errors, which are once again marked critical.The text was updated successfully, but these errors were encountered: