1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 09:09:09 +00:00

Codechange: Make use of the improved C++17 emplace_back function.

This commit is contained in:
Michael Lutz
2020-12-15 00:22:04 +01:00
parent cc1679e317
commit 79240eab1e
14 changed files with 22 additions and 44 deletions

View File

@@ -433,8 +433,7 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transpo
type_check = CheckBridgeAvailability(brd_type, bridge_len);
if (type_check.Succeeded()) {
/* bridge is accepted, add to list */
/*C++17: BuildBridgeData &item = */ bl->emplace_back();
BuildBridgeData &item = bl->back();
BuildBridgeData &item = bl->emplace_back();
item.index = brd_type;
item.spec = GetBridgeSpec(brd_type);
/* Add to terraforming & bulldozing costs the cost of the