1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-23 20:24:12 +01:00

Codechange: Use emplace_back instead of push_back. (#13855)

This commit is contained in:
Peter Nelson
2025-03-20 17:39:10 +00:00
committed by GitHub
parent b98a7ff303
commit 89948b941b
15 changed files with 25 additions and 31 deletions

View File

@@ -717,7 +717,7 @@ CommandCost CmdBuildTunnel(DoCommandFlags flags, TileIndex start_tile, Transport
* Do this for all tiles (like trees), not only objects. */
ClearedObjectArea *coa = FindClearedObject(end_tile);
if (coa == nullptr) {
coa = &_cleared_object_areas.emplace_back(ClearedObjectArea{ end_tile, TileArea(end_tile, 1, 1) });
coa = &_cleared_object_areas.emplace_back(end_tile, TileArea(end_tile, 1, 1));
}
/* Hide the tile from the terraforming command */