cppcheck Supertux

I've run Supertux source code through cppcheck analysis tool. Patch is attached to this post. It just fixes some warnings.
There is one more warning about joysticks.
Look at this code:
I've marked duplicated code. It's easy to understand (compare with another if/else statement. As I'm not sure what does this piece of code has to do, I left it as it is. But it's definitely a copy-paste error.
There is one more warning about joysticks.
Look at this code:
- {l Code}: {l Select All Code}
if(left == joy_axis_map.end()) {
// std::cout << "Unmapped joyaxis " << (int)jaxis.axis << " moved" << std::endl;
} else {
if (jaxis.value < -dead_zone)
set_joy_controls(left->second, true);
else if (jaxis.value > dead_zone)
set_joy_controls(left->second, false); <<- duplicate code for if and else statements!
else
set_joy_controls(left->second, false); <<- duplicate code for if and else statements!
}
if(right == joy_axis_map.end()) {
// std::cout << "Unmapped joyaxis " << (int)jaxis.axis << " moved" << std::endl;
} else {
if (jaxis.value < -dead_zone)
set_joy_controls(right->second, false);
else if (jaxis.value > dead_zone)
set_joy_controls(right->second, true);
else
set_joy_controls(right->second, false);
}
I've marked duplicated code. It's easy to understand (compare with another if/else statement. As I'm not sure what does this piece of code has to do, I left it as it is. But it's definitely a copy-paste error.