summaryrefslogtreecommitdiff
path: root/src/settingsgen
diff options
context:
space:
mode:
authorHenry Wilson <m3henry@googlemail.com>2019-02-18 22:39:06 +0000
committerPeterN <peter@fuzzle.org>2019-03-26 20:15:57 +0000
commita0f36a50e6324f570985f5010eb0543ec0673aeb (patch)
tree09f9c9abd097acc244f80366da42cb8702c7ed19 /src/settingsgen
parentca2f33c6d025c0c45fb4bc472493290445312de5 (diff)
downloadopenttd-a0f36a50e6324f570985f5010eb0543ec0673aeb.tar.xz
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
Diffstat (limited to 'src/settingsgen')
-rw-r--r--src/settingsgen/settingsgen.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/settingsgen/settingsgen.cpp b/src/settingsgen/settingsgen.cpp
index 64901a89f..1847bedff 100644
--- a/src/settingsgen/settingsgen.cpp
+++ b/src/settingsgen/settingsgen.cpp
@@ -121,9 +121,10 @@ public:
text += stored_size;
}
while (length > 0) {
- OutputBuffer *block = this->output_buffer.Append();
- block->Clear(); // Initialize the new block.
- int stored_size = block->Add(text, length);
+ /*C++17: OutputBuffer &block =*/ this->output_buffer.emplace_back();
+ OutputBuffer &block = this->output_buffer.back();
+ block.Clear(); // Initialize the new block.
+ int stored_size = block.Add(text, length);
length -= stored_size;
text += stored_size;
}