-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Replace non-iterator, non-lambda auto with proper type #39829
Conversation
You can have a reference to a pointer; that's what it was doing. Of course, this also relies on the "magic" lifetime-extension of temporaries captured by reference, which is potentially confusing. Regardless, changes are good :). |
I'd say that, but it also didn't work when it was
Just
|
It should be |
Ah, whoops!
|
I see, the |
Summary
SUMMARY: None
Purpose of change
Use proper type in place of auto
Testing
Game & tests compile and run.
Additional context
Some range based loops over
std::vector<item *>
were usingconst auto &it
, whereit
is (obviously) of typeitem *
.When converting these to the proper type, they were changed to item *it, because it's both not a reference and it was being modified in the loop.
Not sure what's up with it working with auto.