diff options
author | Henry Wilson <m3henry@googlemail.com> | 2019-02-17 11:20:52 +0000 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-03-26 20:15:57 +0000 |
commit | ab711e6942757d775c08c31a6c32d488feba1dba (patch) | |
tree | d102dc6d0e6b9c33e7205b63e3360ebd720a3ebb /src/fios_gui.cpp | |
parent | 297fd3dda3abe353ebe2fe77c67b011e24d403bc (diff) | |
download | openttd-ab711e6942757d775c08c31a6c32d488feba1dba.tar.xz |
Codechange: Replaced SmallVector::[Begin|End]() with std alternatives
Diffstat (limited to 'src/fios_gui.cpp')
-rw-r--r-- | src/fios_gui.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/fios_gui.cpp b/src/fios_gui.cpp index 49c1deac3..b5bcee5e8 100644 --- a/src/fios_gui.cpp +++ b/src/fios_gui.cpp @@ -57,9 +57,8 @@ void LoadCheckData::Clear() this->current_date = 0; memset(&this->settings, 0, sizeof(this->settings)); - const CompanyPropertiesMap::iterator end = this->companies.End(); - for (CompanyPropertiesMap::iterator it = this->companies.Begin(); it != end; it++) { - delete it->second; + for (auto &pair : this->companies) { + delete pair.second; } companies.clear(); @@ -531,10 +530,9 @@ public: if (y > y_max) break; /* Companies / AIs */ - CompanyPropertiesMap::const_iterator end = _load_check_data.companies.End(); - for (CompanyPropertiesMap::const_iterator it = _load_check_data.companies.Begin(); it != end; it++) { - SetDParam(0, it->first + 1); - const CompanyProperties &c = *it->second; + for (auto &pair : _load_check_data.companies) { + SetDParam(0, pair.first + 1); + const CompanyProperties &c = *pair.second; if (c.name != NULL) { SetDParam(1, STR_JUST_RAW_STRING); SetDParamStr(2, c.name); |