Resurrecting an old thread...
I just built 0AD for the first time and saw a bunch of these compiler warnings:
../../../source/tools/atlas/AtlasObject/AtlasObjectXML.cpp: In function ‘std::__cxx11::wstring fromXmlChar(const xmlChar*)’:
../../../source/tools/atlas/AtlasObject/AtlasObjectXML.cpp:96:31: warning: this statement may fall through [-Wimplicit-fallthrough=]
case 5: ch += *source++; ch <<= 6;
~~~^~~~~
To get my feet wet with 0AD, I think I can rewrite the code to avoid these warnings and be a little cleaner.
These break-less case statements are all repetitive. I could replace them with for loops.
The number of cases (and if I were to make the change in #1, loop iterations) is hard-coded. They should be replaced with a constant for more clarity.
Let me know what you think.