summaryrefslogtreecommitdiff
path: root/src/newgrf_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-11-24 14:46:26 +0000
committerrubidium <rubidium@openttd.org>2013-11-24 14:46:26 +0000
commit83eeba28b7272a870f777f2f21bfc1def36e873f (patch)
tree592e23a29d5235307e2984cbd8220d0cd3a1ec76 /src/newgrf_gui.cpp
parentdb894b0b3fa13413cdb76989cfcd2bb789243b77 (diff)
downloadopenttd-83eeba28b7272a870f777f2f21bfc1def36e873f.tar.xz
(svn r26086) -Codechange: use AutoDeleteSmallVector instead std::list for dropdowns
Diffstat (limited to 'src/newgrf_gui.cpp')
-rw-r--r--src/newgrf_gui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp
index a1c967663..47cca029a 100644
--- a/src/newgrf_gui.cpp
+++ b/src/newgrf_gui.cpp
@@ -378,7 +378,7 @@ struct NewGRFParametersWindow : public Window {
DropDownList *list = new DropDownList();
for (uint32 i = par_info->min_value; i <= par_info->max_value; i++) {
- list->push_back(new DropDownListCharStringItem(GetGRFStringFromGRFText(par_info->value_names.Find(i)->second), i, false));
+ *list->Append() = new DropDownListCharStringItem(GetGRFStringFromGRFText(par_info->value_names.Find(i)->second), i, false);
}
ShowDropDownListAt(this, list, old_val, -1, wi_rect, COLOUR_ORANGE, true);
@@ -884,11 +884,11 @@ struct NewGRFWindow : public Window, NewGRFScanCallback {
DropDownList *list = new DropDownList();
/* Add 'None' option for clearing list */
- list->push_back(new DropDownListStringItem(STR_NONE, -1, false));
+ *list->Append() = new DropDownListStringItem(STR_NONE, -1, false);
for (uint i = 0; i < _grf_preset_list.Length(); i++) {
if (_grf_preset_list[i] != NULL) {
- list->push_back(new DropDownListPresetItem(i));
+ *list->Append() = new DropDownListPresetItem(i);
}
}