summaryrefslogtreecommitdiff
path: root/src/company_gui.cpp
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/company_gui.cpp
parentca2f33c6d025c0c45fb4bc472493290445312de5 (diff)
downloadopenttd-a0f36a50e6324f570985f5010eb0543ec0673aeb.tar.xz
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
Diffstat (limited to 'src/company_gui.cpp')
-rw-r--r--src/company_gui.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/company_gui.cpp b/src/company_gui.cpp
index b34862f69..a705687b0 100644
--- a/src/company_gui.cpp
+++ b/src/company_gui.cpp
@@ -606,10 +606,10 @@ private:
if (default_livery != NULL) {
/* Add COLOUR_END to put the colour out of range, but also allow us to show what the default is */
default_col = (primary ? default_livery->colour1 : default_livery->colour2) + COLOUR_END;
- *list->Append() = new DropDownListColourItem(default_col, false);
+ list->push_back(new DropDownListColourItem(default_col, false));
}
for (uint i = 0; i < lengthof(_colour_dropdown); i++) {
- *list->Append() = new DropDownListColourItem(i, HasBit(used_colours, i));
+ list->push_back(new DropDownListColourItem(i, HasBit(used_colours, i)));
}
byte sel = (default_livery == NULL || HasBit(livery->in_use, primary ? 0 : 1)) ? (primary ? livery->colour1 : livery->colour2) : default_col;
@@ -642,8 +642,8 @@ private:
{
for (const Group **g = source->Begin(); g != source->End(); g++) {
if ((*g)->parent != parent) continue;
- *this->groups.Append() = *g;
- *this->indents.Append() = indent;
+ this->groups.push_back(*g);
+ this->indents.push_back(indent);
AddChildren(source, (*g)->index, indent + 1);
}
}
@@ -662,7 +662,7 @@ private:
const Group *g;
FOR_ALL_GROUPS(g) {
if (g->owner == owner && g->vehicle_type == vtype) {
- *list.Append() = g;
+ list.push_back(g);
}
}