From c51599f4feb7f2abcfb0ff024a89975a8f4960b5 Mon Sep 17 00:00:00 2001 From: titiger Date: Mon, 30 Nov 2015 20:53:04 +0100 Subject: [PATCH] Coverty scan 1308703; Logically dead code --- source/glest_game/gui/gui.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/source/glest_game/gui/gui.cpp b/source/glest_game/gui/gui.cpp index ad1467d7c..1bf28e944 100644 --- a/source/glest_game/gui/gui.cpp +++ b/source/glest_game/gui/gui.cpp @@ -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); } }