Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()

This commit is contained in:
Henry Wilson
2019-02-18 22:39:06 +00:00
committed by PeterN
parent ca2f33c6d0
commit a0f36a50e6
79 changed files with 402 additions and 403 deletions

View File

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