← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/fix_resource_overlay into lp:widelands

 

I fixed everything but

3. /src/editor/editorinteractive.cc:635:9: Warnung: Die Standardfallbehandlung in switch fehlt [-Wswitch-default]

that is a stupid warning. I handled all possible cases in this switch() statement for the enum class it handles. The default: should never be taken, so it should actually not be there. I prepare a branch to remove this warning. 

> I noticed that you use variable type "auto" a lot - please double-check if you can be more specific. Strong typing is good ;)

auto is not any less strong typing, since the compiler knows the exact type. In fact auto can be stronger typing than explicit types because it never does implicit conversion. 

int32_t a = 1;
uint8_t b = 9;
uint8_t c = a - b; // is a bug, underflow.
auto c = a - b; // works, means type of c == int32_t, so all is good.

If you feel it impedes readability in a specific place, I will add types of course.

@bunnybot merge

-- 
https://code.launchpad.net/~widelands-dev/widelands/fix_resource_overlay/+merge/282680
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/fix_resource_overlay.


References