Coverty scan 1308703; Logically dead code

This commit is contained in:
titiger 2015-11-30 20:53:04 +01:00
parent cfa9f38155
commit c51599f4fe
1 changed files with 3 additions and 6 deletions

View File

@ -288,15 +288,12 @@ void Gui::mouseDownRightGraphics(int x, int y , bool prepared) {
else if(selection.isCommandable()) {
if(prepared) {
Vec2i targetPos=game->getMouseCellPos();
if(prepared || (game->isValidMouseCellPos() &&
world->getMap()->isInsideSurface(world->getMap()->toSurfCoords(targetPos)) == true )) {
givePreparedDefaultOrders(x, y);
}
givePreparedDefaultOrders(x, y);
}
else {
Vec2i targetPos=game->getMouseCellPos();
if(prepared || (game->isValidMouseCellPos() &&
world->getMap()->isInsideSurface(world->getMap()->toSurfCoords(targetPos)) == true)) {
if(game->isValidMouseCellPos() &&
world->getMap()->isInsideSurface(world->getMap()->toSurfCoords(targetPos)) == true) {
giveDefaultOrders(x, y);
}
}