diff options
author | Michael Lutz <michi@icosahedron.de> | 2020-12-15 00:22:04 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2020-12-15 00:29:30 +0100 |
commit | 79240eab1ee4abb2882a40c7ac18e4915b4dc820 (patch) | |
tree | 98abb3c8ccf490efa459ed29fe7f28699c8d9928 /src/bridge_gui.cpp | |
parent | cc1679e3171bf6982164c4072a773fdd687ea885 (diff) | |
download | openttd-79240eab1ee4abb2882a40c7ac18e4915b4dc820.tar.xz |
Codechange: Make use of the improved C++17 emplace_back function.
Diffstat (limited to 'src/bridge_gui.cpp')
-rw-r--r-- | src/bridge_gui.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/bridge_gui.cpp b/src/bridge_gui.cpp index 44cc99ba3..a69ed7448 100644 --- a/src/bridge_gui.cpp +++ b/src/bridge_gui.cpp @@ -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 |