Remove loop* and loopv* macros from menus.cpp#175
Remove loop* and loopv* macros from menus.cpp#175MoonPadUSer wants to merge 4 commits intomasterfrom
Conversation
|
You're using a different code style, '{' on same line and space after |
|
@robalni Indeed, I do. Because: saves space and is just as easy to read as I only like to do that when there's only one line inside the curly brackets (I hope I didn't violate that rule in here) |
|
I prefer to have everything the same, otherwise it will look like a mess after a while. |
|
Hum, ok, can't hurt. :) will change it |
|
alright, now it should be good. |
| g.text("the following settings have changed:"); | ||
| g.pushfont("little"); | ||
| loopv(needsapply) g.text(needsapply[i].desc, 0xFFFFFF, "point"); | ||
| for (int i = 0; i < needsapply.length(); i++) |
There was a problem hiding this comment.
I would suggest not to just stubbornly replace all occurrences of the macro, but just go for the more modern iterator-based loops where applicable. How about
| for (int i = 0; i < needsapply.length(); i++) | |
| for (const auto& i : needsapply) |
If you can not use this approach, please don't use the deprecated length() but the STL-compatible size().
Applies to pretty much all loops you modified.
There was a problem hiding this comment.
Yeah, I'll do that
Basically just doing a little bit of refactoring by getting rid of all
loopmacros insrc/engine/menus.cpp