diff options
author | rubidium <rubidium@openttd.org> | 2013-11-24 14:46:26 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-11-24 14:46:26 +0000 |
commit | 83eeba28b7272a870f777f2f21bfc1def36e873f (patch) | |
tree | 592e23a29d5235307e2984cbd8220d0cd3a1ec76 /src/industry_gui.cpp | |
parent | db894b0b3fa13413cdb76989cfcd2bb789243b77 (diff) | |
download | openttd-83eeba28b7272a870f777f2f21bfc1def36e873f.tar.xz |
(svn r26086) -Codechange: use AutoDeleteSmallVector instead std::list for dropdowns
Diffstat (limited to 'src/industry_gui.cpp')
-rw-r--r-- | src/industry_gui.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index 6f13dfeaf..b21ab70ca 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -2590,9 +2590,9 @@ struct IndustryCargoesWindow : public Window { DropDownList *lst = new DropDownList; const CargoSpec *cs; FOR_ALL_SORTED_STANDARD_CARGOSPECS(cs) { - lst->push_back(new DropDownListStringItem(cs->name, cs->Index(), false)); + *lst->Append() = new DropDownListStringItem(cs->name, cs->Index(), false); } - if (lst->size() == 0) { + if (lst->Length() == 0) { delete lst; break; } @@ -2607,9 +2607,9 @@ struct IndustryCargoesWindow : public Window { IndustryType ind = _sorted_industry_types[i]; const IndustrySpec *indsp = GetIndustrySpec(ind); if (!indsp->enabled) continue; - lst->push_back(new DropDownListStringItem(indsp->name, ind, false)); + *lst->Append() = new DropDownListStringItem(indsp->name, ind, false); } - if (lst->size() == 0) { + if (lst->Length() == 0) { delete lst; break; } |