summaryrefslogtreecommitdiff
path: root/src/settingsgen
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2020-12-15 00:22:04 +0100
committerMichael Lutz <michi@icosahedron.de>2020-12-15 00:29:30 +0100
commit79240eab1ee4abb2882a40c7ac18e4915b4dc820 (patch)
tree98abb3c8ccf490efa459ed29fe7f28699c8d9928 /src/settingsgen
parentcc1679e3171bf6982164c4072a773fdd687ea885 (diff)
downloadopenttd-79240eab1ee4abb2882a40c7ac18e4915b4dc820.tar.xz
Codechange: Make use of the improved C++17 emplace_back function.
Diffstat (limited to 'src/settingsgen')
-rw-r--r--src/settingsgen/settingsgen.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/settingsgen/settingsgen.cpp b/src/settingsgen/settingsgen.cpp
index 764f370bd..b2a3c76f6 100644
--- a/src/settingsgen/settingsgen.cpp
+++ b/src/settingsgen/settingsgen.cpp
@@ -118,8 +118,7 @@ public:
text += stored_size;
}
while (length > 0) {
- /*C++17: OutputBuffer &block =*/ this->output_buffer.emplace_back();
- OutputBuffer &block = this->output_buffer.back();
+ OutputBuffer &block = this->output_buffer.emplace_back();
block.Clear(); // Initialize the new block.
size_t stored_size = block.Add(text, length);
length -= stored_size;