1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-27 16:39: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

@@ -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;