blue-nebula / base

Main repository of Blue Nebula, a fast-paced shooter with a unique parkour system. It is a fork of Red Eclipse and is free software.
https://blue-nebula.org
15 stars 6 forks source link

Remove loop* and loopv* macros from menus.cpp #175

Open MoonPadUSer opened 3 years ago

MoonPadUSer commented 3 years ago

Basically just doing a little bit of refactoring by getting rid of all loop macros in src/engine/menus.cpp

robalni commented 3 years ago

You're using a different code style, '{' on same line and space after if and for.

MoonPadUSer commented 3 years ago

@robalni Indeed, I do. Because:

for (int i = 0; i < 2; i++) {
    printf("This is fine\n");
}

saves space and is just as easy to read as

for (int i = 0; i < 2; i++)
{
    printf("This is great too!\n");
}

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)

robalni commented 3 years ago

I prefer to have everything the same, otherwise it will look like a mess after a while.

MoonPadUSer commented 3 years ago

Hum, ok, can't hurt. :) will change it

MoonPadUSer commented 3 years ago

alright, now it should be good.