Code review comment for lp:~widelands-dev/widelands/bug-986611-cppcheck-uninitialized-variables

Revision history for this message
SirVer (sirver) wrote :

> Well, it's just the same as initializing numbers to 0 - cppcheck is complaining, so I'm trying to get rid of that noise in the report.

That would be wrong though - plain old datatypes (POD) are not initialized in cpp, so numbers are indeed a random value if not properly initialized. std::string is a class, not a POD though so its constructor is always run. If cppcheck complains about this it would be wrong. I wonder if it is worthwhile to clutter the code with unnecessary (and for std::string even slightly decremental) changes to appease the tool.

« Back to merge proposal