summaryrefslogtreecommitdiff
path: root/src/settings_gui.cpp
diff options
context:
space:
mode:
authorHenry Wilson <m3henry@googlemail.com>2018-09-23 12:23:54 +0100
committerPeterN <peter@fuzzle.org>2019-03-26 20:15:57 +0000
commita690936ed75e96627be0e2ecafee2360a71e8d3c (patch)
tree1221c131b8fe3a51cf43a6bd7d89a51c431c559d /src/settings_gui.cpp
parent56ae855dc20b27593c9a454d5a09d8f892a6c71f (diff)
downloadopenttd-a690936ed75e96627be0e2ecafee2360a71e8d3c.tar.xz
Codechange: Replace SmallVector::Length() with std::vector::size()
Diffstat (limited to 'src/settings_gui.cpp')
-rw-r--r--src/settings_gui.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp
index fda7cfa52..8b20bb9f2 100644
--- a/src/settings_gui.cpp
+++ b/src/settings_gui.cpp
@@ -215,7 +215,7 @@ struct GameOptionsWindow : Window {
if (i == CURRENCY_CUSTOM) continue;
*list->Append() = new DropDownListStringItem(*items, i, HasBit(disabled, i));
}
- QSortT(list->Begin(), list->Length(), DropDownListStringItem::NatSortFunc);
+ QSortT(list->Begin(), list->size(), DropDownListStringItem::NatSortFunc);
/* Append custom currency at the end */
*list->Append() = new DropDownListItem(-1, false); // separator line
@@ -253,9 +253,9 @@ struct GameOptionsWindow : Window {
int result = _nb_orig_names + i;
*list->Append() = new DropDownListStringItem(_grf_names[i], result, enabled_item != result && enabled_item >= 0);
}
- QSortT(list->Begin(), list->Length(), DropDownListStringItem::NatSortFunc);
+ QSortT(list->Begin(), list->size(), DropDownListStringItem::NatSortFunc);
- int newgrf_size = list->Length();
+ int newgrf_size = list->size();
/* Insert newgrf_names at the top of the list */
if (newgrf_size > 0) {
*list->Append() = new DropDownListItem(-1, false); // separator line
@@ -266,7 +266,7 @@ struct GameOptionsWindow : Window {
for (int i = 0; i < _nb_orig_names; i++) {
*list->Append() = new DropDownListStringItem(STR_GAME_OPTIONS_TOWN_NAME_ORIGINAL_ENGLISH + i, i, enabled_item != i && enabled_item >= 0);
}
- QSortT(list->Begin() + newgrf_size, list->Length() - newgrf_size, DropDownListStringItem::NatSortFunc);
+ QSortT(list->Begin() + newgrf_size, list->size() - newgrf_size, DropDownListStringItem::NatSortFunc);
break;
}
@@ -282,11 +282,11 @@ struct GameOptionsWindow : Window {
case WID_GO_LANG_DROPDOWN: { // Setup interface language dropdown
list = new DropDownList();
- for (uint i = 0; i < _languages.Length(); i++) {
+ for (uint i = 0; i < _languages.size(); i++) {
if (&_languages[i] == _current_language) *selected_index = i;
*list->Append() = new DropDownListStringItem(SPECSTR_LANGUAGE_START + i, i, false);
}
- QSortT(list->Begin(), list->Length(), DropDownListStringItem::NatSortFunc);
+ QSortT(list->Begin(), list->size(), DropDownListStringItem::NatSortFunc);
break;
}