Codefix: missing space between close parenthesis and open curly brace

This commit is contained in:
Rubidium 2024-04-16 18:44:55 +02:00 committed by rubidium42
parent 48eb9b8bc9
commit b2218e75d4
6 changed files with 7 additions and 7 deletions

View File

@ -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);
}

View File

@ -27,7 +27,7 @@ static std::vector<StringID> _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)

View File

@ -2299,7 +2299,7 @@ static void SetDefaultRailGui()
case 0: {
/* Use first available type */
std::vector<RailType>::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;
}

View File

@ -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);

View File

@ -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]++;

View File

@ -23,7 +23,7 @@
* Other than that, make sure you only set one callback per priority.
*
* For example:
* IntervalTimer<TimerGameCalendar>({TimerGameCalendar::DAY, TimerGameCalendar::Priority::NONE}, [](uint count){});
* IntervalTimer<TimerGameCalendar>({TimerGameCalendar::DAY, TimerGameCalendar::Priority::NONE}, [](uint count) {});
*
* @note Callbacks are executed in the game-thread.
*/