mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-21 03:12:41 +01:00
Codechange: Use emplace_back instead of push_back. (#13855)
This commit is contained in:
@@ -2248,7 +2248,7 @@ static const BaseStation *FindStationsNearby(TileArea ta, bool distant_join)
|
||||
if (T::IsValidBaseStation(st) && !st->IsInUse() && st->owner == _local_company) {
|
||||
/* Include only within station spread (yes, it is strictly less than) */
|
||||
if (std::max(DistanceMax(ta.tile, st->xy), DistanceMax(TileAddXY(ta.tile, ta.w - 1, ta.h - 1), st->xy)) < _settings_game.station.station_spread) {
|
||||
_deleted_stations_nearby.push_back({st->xy, st->index});
|
||||
_deleted_stations_nearby.emplace_back(st->xy, st->index);
|
||||
|
||||
/* Add the station when it's within where we're going to build */
|
||||
if (IsInsideBS(TileX(st->xy), TileX(ctx.tile), ctx.w) &&
|
||||
|
||||
Reference in New Issue
Block a user