1
0
Fork 0

Codechange: Ensure space between `for`/`if` and `(`.

pull/11454/head
Peter Nelson 2023-11-09 19:23:26 +00:00 committed by Peter Nelson
parent d4008850e3
commit 938c8339d2
3 changed files with 4 additions and 4 deletions

View File

@ -278,7 +278,7 @@ private:
this->title = lt->title; this->title = lt->title;
std::vector<const LeagueTableElement *> elements; std::vector<const LeagueTableElement *> elements;
for(LeagueTableElement *lte : LeagueTableElement::Iterate()) { for (LeagueTableElement *lte : LeagueTableElement::Iterate()) {
if (lte->table == this->table) { if (lte->table == this->table) {
elements.push_back(lte); elements.push_back(lte);
} }

View File

@ -792,7 +792,7 @@ public:
if (_settings_client.gui.quick_goto && v->owner == _local_company) { if (_settings_client.gui.quick_goto && v->owner == _local_company) {
/* If there are less than 2 station, make Go To active. */ /* If there are less than 2 station, make Go To active. */
int station_orders = 0; int station_orders = 0;
for(const Order *order : v->Orders()) { for (const Order *order : v->Orders()) {
if (order->IsType(OT_GOTO_STATION)) station_orders++; if (order->IsType(OT_GOTO_STATION)) station_orders++;
} }

View File

@ -1372,7 +1372,7 @@ static CommandCost CmdSignalTrackHelper(DoCommandFlag flags, TileIndex tile, Til
last_suitable_trackdir = trackdir; 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. */ /* We're always keeping regular interval between signals so doesn't matter whether we succeed or not. */
build_signal(tile, trackdir, false); build_signal(tile, trackdir, false);
last_used_ctr = signal_ctr; 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. /* 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. */ * We start with TILE_AXIAL_DISTANCE as one bridge tile gets processed in the main loop. */
signal_ctr += TILE_AXIAL_DISTANCE; 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; if (signal_ctr >= last_used_ctr + signal_density) last_used_ctr = signal_ctr;
signal_ctr += TILE_AXIAL_DISTANCE; signal_ctr += TILE_AXIAL_DISTANCE;
} }