From 938c8339d2939b989fd6fa614be1284e361851da Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Thu, 9 Nov 2023 19:23:26 +0000 Subject: [PATCH] Codechange: Ensure space between `for`/`if` and `(`. --- src/league_gui.cpp | 2 +- src/order_gui.cpp | 2 +- src/rail_cmd.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/league_gui.cpp b/src/league_gui.cpp index 3998f2e571..a1c64a6c8f 100644 --- a/src/league_gui.cpp +++ b/src/league_gui.cpp @@ -278,7 +278,7 @@ private: this->title = lt->title; std::vector elements; - for(LeagueTableElement *lte : LeagueTableElement::Iterate()) { + for (LeagueTableElement *lte : LeagueTableElement::Iterate()) { if (lte->table == this->table) { elements.push_back(lte); } diff --git a/src/order_gui.cpp b/src/order_gui.cpp index 0335ff4d68..0bf8857efd 100644 --- a/src/order_gui.cpp +++ b/src/order_gui.cpp @@ -792,7 +792,7 @@ public: if (_settings_client.gui.quick_goto && v->owner == _local_company) { /* If there are less than 2 station, make Go To active. */ int station_orders = 0; - for(const Order *order : v->Orders()) { + for (const Order *order : v->Orders()) { if (order->IsType(OT_GOTO_STATION)) station_orders++; } diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp index d4dd2fe65d..2689f7f170 100644 --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -1372,7 +1372,7 @@ static CommandCost CmdSignalTrackHelper(DoCommandFlag flags, TileIndex tile, Til last_suitable_trackdir = trackdir; } } - } else if(signal_ctr >= last_used_ctr + signal_density) { + } else if (signal_ctr >= last_used_ctr + signal_density) { /* We're always keeping regular interval between signals so doesn't matter whether we succeed or not. */ build_signal(tile, trackdir, false); last_used_ctr = signal_ctr; @@ -1396,7 +1396,7 @@ static CommandCost CmdSignalTrackHelper(DoCommandFlag flags, TileIndex tile, Til /* To keep regular interval we need to emulate placing signals on a bridge. * We start with TILE_AXIAL_DISTANCE as one bridge tile gets processed in the main loop. */ signal_ctr += TILE_AXIAL_DISTANCE; - for(uint i = TILE_AXIAL_DISTANCE; i < len; i += TILE_AXIAL_DISTANCE) { + for (uint i = TILE_AXIAL_DISTANCE; i < len; i += TILE_AXIAL_DISTANCE) { if (signal_ctr >= last_used_ctr + signal_density) last_used_ctr = signal_ctr; signal_ctr += TILE_AXIAL_DISTANCE; }