Codechange: Replaced SmallVector::[Begin|End]() with std alternatives

This commit is contained in:
Henry Wilson
2019-02-17 11:20:52 +00:00
committed by PeterN
parent 297fd3dda3
commit ab711e6942
75 changed files with 464 additions and 555 deletions

View File

@@ -183,8 +183,8 @@ class ReplaceVehicleWindow : public Window {
this->vscroll[1]->SetCount(this->engines[1].size());
if (this->reset_sel_engine && this->sel_engine[1] != INVALID_ENGINE) {
int position = 0;
for (EngineID *it = this->engines[1].Begin(); it != this->engines[1].End(); ++it) {
if (*it == this->sel_engine[1]) break;
for (EngineID &eid : this->engines[1]) {
if (eid == this->sel_engine[1]) break;
++position;
}
this->vscroll[1]->ScrollTowards(position);