Youda008 / DoomRunner

Preset-oriented graphical launcher of various ported Doom engines (an alternative to ZDL)
GNU General Public License v3.0
203 stars 13 forks source link

Use Uniform Initialization Syntax {} rather than parenthesis () #148

Closed Luke-Wolf closed 4 months ago

Luke-Wolf commented 5 months ago

Change Initializer Lists in Constructors to use Uniform Initialization Syntax rather than parenthesis. Fixes build in FreeBSD due to major() and minor() macros in sys/types.h causing an issue in Version.hpp.

Youda008 commented 5 months ago

Is it necessary to change all of these? I would prefer if it was fixed only where it causes build issues. Otherwise i'm affraid there will be many more of these initializations in other files too.

Also, please revert indentation back to tabs 😁😁

Luke-Wolf commented 5 months ago

I'm not sure how to make Qt Creator not clobber the tabs so had to go to another editor to fix them. Even setting Tabs Only didn't work.

Only the change in Version.hpp is needed, and only then changing major and minor to not collide with the macro. I can revert the other locations but I figured if it's worth changing one place it's worth changing in all the headers.

Youda008 commented 4 months ago

Problem is that this class member initialization is present in almost every source file, not just those you changed. So now half of the project uses one syntax and second half uses the other one. Also i don't like the brace initialization, so i would rather not have it changed everywhere.

So with your permission, i will rather commit only the necessary change, and close this PR.