From b2218e75d4dea4261c6638579d3e501080b85bdc Mon Sep 17 00:00:00 2001 From: Rubidium Date: Tue, 16 Apr 2024 18:44:55 +0200 Subject: [PATCH] Codefix: missing space between close parenthesis and open curly brace --- src/build_vehicle_gui.cpp | 2 +- src/newgrf_townname.cpp | 4 ++-- src/rail_gui.cpp | 2 +- src/station_cmd.cpp | 2 +- src/tgp.cpp | 2 +- src/timer/timer_game_common.h | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index 9d97603b3c..ba73bf56f9 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -1260,7 +1260,7 @@ struct BuildVehicleWindow : Window { /* Select the first unshaded engine in the list as default when opening the window */ EngineID engine = INVALID_ENGINE; - auto it = std::find_if(this->eng_list.begin(), this->eng_list.end(), [&](GUIEngineListItem &item){ return (item.flags & EngineDisplayFlags::Shaded) == EngineDisplayFlags::None; }); + auto it = std::find_if(this->eng_list.begin(), this->eng_list.end(), [&](GUIEngineListItem &item) { return (item.flags & EngineDisplayFlags::Shaded) == EngineDisplayFlags::None; }); if (it != this->eng_list.end()) engine = it->engine_id; this->SelectEngine(engine); } diff --git a/src/newgrf_townname.cpp b/src/newgrf_townname.cpp index d70f7892e2..ae95d79525 100644 --- a/src/newgrf_townname.cpp +++ b/src/newgrf_townname.cpp @@ -27,7 +27,7 @@ static std::vector _grf_townname_names; GRFTownName *GetGRFTownName(uint32_t grfid) { - auto found = std::find_if(std::begin(_grf_townnames), std::end(_grf_townnames), [&grfid](const GRFTownName &t){ return t.grfid == grfid; }); + auto found = std::find_if(std::begin(_grf_townnames), std::end(_grf_townnames), [&grfid](const GRFTownName &t) { return t.grfid == grfid; }); if (found != std::end(_grf_townnames)) return &*found; return nullptr; } @@ -44,7 +44,7 @@ GRFTownName *AddGRFTownName(uint32_t grfid) void DelGRFTownName(uint32_t grfid) { - _grf_townnames.erase(std::find_if(std::begin(_grf_townnames), std::end(_grf_townnames), [&grfid](const GRFTownName &t){ return t.grfid == grfid; })); + _grf_townnames.erase(std::find_if(std::begin(_grf_townnames), std::end(_grf_townnames), [&grfid](const GRFTownName &t) { return t.grfid == grfid; })); } static void RandomPart(StringBuilder &builder, const GRFTownName *t, uint32_t seed, uint8_t id) diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index d3dfd94db6..c09b5942eb 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -2299,7 +2299,7 @@ static void SetDefaultRailGui() case 0: { /* Use first available type */ std::vector::const_iterator it = std::find_if(_sorted_railtypes.begin(), _sorted_railtypes.end(), - [](RailType r){ return HasRailTypeAvail(_local_company, r); }); + [](RailType r) { return HasRailTypeAvail(_local_company, r); }); rt = it != _sorted_railtypes.end() ? *it : RAILTYPE_BEGIN; break; } diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 5385d78887..c1c81f893e 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -985,7 +985,7 @@ static CommandCost CheckFlatLandRoadStop(TileIndex cur_tile, int &allowed_z, DoC return ClearTile_Station(cur_tile, DC_AUTO); // Get error message. } /* Drive-through station in the wrong direction. */ - if (is_drive_through && IsDriveThroughStopTile(cur_tile) && DiagDirToAxis(GetRoadStopDir(cur_tile)) != axis){ + if (is_drive_through && IsDriveThroughStopTile(cur_tile) && DiagDirToAxis(GetRoadStopDir(cur_tile)) != axis) { return_cmd_error(STR_ERROR_DRIVE_THROUGH_DIRECTION); } StationID st = GetStationIndex(cur_tile); diff --git a/src/tgp.cpp b/src/tgp.cpp index d250f252d0..97860024fd 100644 --- a/src/tgp.cpp +++ b/src/tgp.cpp @@ -444,7 +444,7 @@ static int *HeightMapMakeHistogram(Height h_min, [[maybe_unused]] Height h_max, int *hist = hist_buf - h_min; /* Count the heights and fill the histogram */ - for (const Height &h : _height_map.h){ + for (const Height &h : _height_map.h) { assert(h >= h_min); assert(h <= h_max); hist[h]++; diff --git a/src/timer/timer_game_common.h b/src/timer/timer_game_common.h index 1481f9581f..d3548cac48 100644 --- a/src/timer/timer_game_common.h +++ b/src/timer/timer_game_common.h @@ -23,7 +23,7 @@ * Other than that, make sure you only set one callback per priority. * * For example: - * IntervalTimer({TimerGameCalendar::DAY, TimerGameCalendar::Priority::NONE}, [](uint count){}); + * IntervalTimer({TimerGameCalendar::DAY, TimerGameCalendar::Priority::NONE}, [](uint count) {}); * * @note Callbacks are executed in the game-thread. */