diff options
author | Henry Wilson <m3henry@googlemail.com> | 2019-02-20 19:27:10 +0000 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-03-26 20:15:57 +0000 |
commit | 2bc2de9034d3b75a253b849cf7a703b1a503e200 (patch) | |
tree | 39f3a8e94a6f993f20dbbf027b6cdd684ab4ce4c /src/newgrf_gui.cpp | |
parent | e0c58bf5ee0f3f4d0563a04de315c09b37f74c6e (diff) | |
download | openttd-2bc2de9034d3b75a253b849cf7a703b1a503e200.tar.xz |
Codechange: Replaced SmallVector::Find() with std::find()
Diffstat (limited to 'src/newgrf_gui.cpp')
-rw-r--r-- | src/newgrf_gui.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index 0db38e297..1473f1877 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -1486,8 +1486,10 @@ private: this->avails.Sort(); if (this->avail_sel != NULL) { - this->avail_pos = this->avails.FindIndex(this->avail_sel); - if (this->avail_pos < 0) this->avail_sel = NULL; + this->avail_pos = find_index(this->avails, this->avail_sel); + if (this->avail_pos == -1) { + this->avail_sel = NULL; + } } this->vscroll2->SetCount(this->avails.size()); // Update the scrollbar |