mirror of https://github.com/OpenTTD/OpenTTD.git
Codefix: missing space between close parenthesis and open curly brace
This commit is contained in:
parent
48eb9b8bc9
commit
b2218e75d4
|
@ -1260,7 +1260,7 @@ struct BuildVehicleWindow : Window {
|
||||||
|
|
||||||
/* Select the first unshaded engine in the list as default when opening the window */
|
/* Select the first unshaded engine in the list as default when opening the window */
|
||||||
EngineID engine = INVALID_ENGINE;
|
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;
|
if (it != this->eng_list.end()) engine = it->engine_id;
|
||||||
this->SelectEngine(engine);
|
this->SelectEngine(engine);
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ static std::vector<StringID> _grf_townname_names;
|
||||||
|
|
||||||
GRFTownName *GetGRFTownName(uint32_t grfid)
|
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;
|
if (found != std::end(_grf_townnames)) return &*found;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ GRFTownName *AddGRFTownName(uint32_t grfid)
|
||||||
|
|
||||||
void DelGRFTownName(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)
|
static void RandomPart(StringBuilder &builder, const GRFTownName *t, uint32_t seed, uint8_t id)
|
||||||
|
|
|
@ -2299,7 +2299,7 @@ static void SetDefaultRailGui()
|
||||||
case 0: {
|
case 0: {
|
||||||
/* Use first available type */
|
/* Use first available type */
|
||||||
std::vector<RailType>::const_iterator it = std::find_if(_sorted_railtypes.begin(), _sorted_railtypes.end(),
|
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;
|
rt = it != _sorted_railtypes.end() ? *it : RAILTYPE_BEGIN;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -985,7 +985,7 @@ static CommandCost CheckFlatLandRoadStop(TileIndex cur_tile, int &allowed_z, DoC
|
||||||
return ClearTile_Station(cur_tile, DC_AUTO); // Get error message.
|
return ClearTile_Station(cur_tile, DC_AUTO); // Get error message.
|
||||||
}
|
}
|
||||||
/* Drive-through station in the wrong direction. */
|
/* 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);
|
return_cmd_error(STR_ERROR_DRIVE_THROUGH_DIRECTION);
|
||||||
}
|
}
|
||||||
StationID st = GetStationIndex(cur_tile);
|
StationID st = GetStationIndex(cur_tile);
|
||||||
|
|
|
@ -444,7 +444,7 @@ static int *HeightMapMakeHistogram(Height h_min, [[maybe_unused]] Height h_max,
|
||||||
int *hist = hist_buf - h_min;
|
int *hist = hist_buf - h_min;
|
||||||
|
|
||||||
/* Count the heights and fill the histogram */
|
/* 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_min);
|
||||||
assert(h <= h_max);
|
assert(h <= h_max);
|
||||||
hist[h]++;
|
hist[h]++;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
* Other than that, make sure you only set one callback per priority.
|
* Other than that, make sure you only set one callback per priority.
|
||||||
*
|
*
|
||||||
* For example:
|
* 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.
|
* @note Callbacks are executed in the game-thread.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue