diff --git a/src/autoreplace.cpp b/src/autoreplace.cpp --- a/src/autoreplace.cpp +++ b/src/autoreplace.cpp @@ -85,8 +85,7 @@ CommandCost RemoveEngineReplacement(Engi EngineRenew *er = (EngineRenew *)(*erl); EngineRenew *prev = NULL; - while (er) - { + while (er) { if (er->from == engine && er->group_id == group) { if (flags & DC_EXEC) { if (prev == NULL) { // First element diff --git a/src/misc_cmd.cpp b/src/misc_cmd.cpp --- a/src/misc_cmd.cpp +++ b/src/misc_cmd.cpp @@ -53,7 +53,7 @@ CommandCost CmdIncreaseLoan(TileIndex ti loan = _economy.max_loan - c->current_loan; break; case 2: // Take the given amount of loan - if ((((int32)p1 < LOAN_INTERVAL) || c->current_loan + (int32)p1 > _economy.max_loan || (p1 % LOAN_INTERVAL) != 0)) return CMD_ERROR; + if ((int32)p1 < LOAN_INTERVAL || c->current_loan + (int32)p1 > _economy.max_loan || p1 % LOAN_INTERVAL != 0) return CMD_ERROR; loan = p1; break; } @@ -97,7 +97,7 @@ CommandCost CmdDecreaseLoan(TileIndex ti loan -= loan % LOAN_INTERVAL; break; case 2: // Repay the given amount of loan - if ((p1 % LOAN_INTERVAL != 0) || ((int32)p1 < LOAN_INTERVAL)) return CMD_ERROR; // Invalid amount to loan + if (p1 % LOAN_INTERVAL != 0 || (int32)p1 < LOAN_INTERVAL) return CMD_ERROR; // Invalid amount to loan loan = p1; break; } diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -872,8 +872,7 @@ CommandCost CmdMoveOrder(TileIndex tile, /* Don't make senseless movements */ if (moving_order >= v->GetNumOrders() || target_order >= v->GetNumOrders() || - moving_order == target_order || v->GetNumOrders() <= 1) - return CMD_ERROR; + moving_order == target_order || v->GetNumOrders() <= 1) return CMD_ERROR; Order *moving_one = v->GetOrder(moving_order); /* Don't move an empty order */ diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -727,8 +727,7 @@ static CommandCost ValidateAutoDrag(Trac if (!IsDiagonalTrackdir(*trackdir)) { trdx = _trackdelta[*trackdir].x; trdy = _trackdelta[*trackdir].y; - if (abs(dx) != abs(dy) && abs(dx) + abs(trdy) != abs(dy) + abs(trdx)) - return CMD_ERROR; + if (abs(dx) != abs(dy) && abs(dx) + abs(trdy) != abs(dy) + abs(trdx)) return CMD_ERROR; } return CommandCost(); diff --git a/src/tunnelbridge_cmd.cpp b/src/tunnelbridge_cmd.cpp --- a/src/tunnelbridge_cmd.cpp +++ b/src/tunnelbridge_cmd.cpp @@ -87,9 +87,9 @@ int CalcBridgeLenCostFactor(int x) Foundation GetBridgeFoundation(Slope tileh, Axis axis) { - if ((tileh == SLOPE_FLAT) || - (((tileh == SLOPE_NE) || (tileh == SLOPE_SW)) && (axis == AXIS_X)) || - (((tileh == SLOPE_NW) || (tileh == SLOPE_SE)) && (axis == AXIS_Y))) return FOUNDATION_NONE; + if (tileh == SLOPE_FLAT || + ((tileh == SLOPE_NE || tileh == SLOPE_SW) && axis == AXIS_X) || + ((tileh == SLOPE_NW || tileh == SLOPE_SE) && axis == AXIS_Y)) return FOUNDATION_NONE; return (HasSlopeHighestCorner(tileh) ? InclinedFoundation(axis) : FlatteningFoundation(tileh)); }