diff options
author | Henry Wilson <m3henry@googlemail.com> | 2019-02-12 22:59:12 +0000 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-03-26 20:15:57 +0000 |
commit | 5795f66d2eebccbc8e04b80ebaf163f636479f9e (patch) | |
tree | 53bedfa6e40953f7aaeba3f7c2648e0839aef354 /src/build_vehicle_gui.cpp | |
parent | b1f5119d3af2fb47a2f1c752d61a742f41076451 (diff) | |
download | openttd-5795f66d2eebccbc8e04b80ebaf163f636479f9e.tar.xz |
Codechange: Replaced SmallVector::Contains() with std::find() pattern
Diffstat (limited to 'src/build_vehicle_gui.cpp')
-rw-r--r-- | src/build_vehicle_gui.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index ce3ebeff4..a118b1c99 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -1207,7 +1207,7 @@ struct BuildVehicleWindow : Window { this->eng_list.Filter(this->cargo_filter[this->cargo_filter_criteria]); if (0 == this->eng_list.size()) { // no engine passed through the filter, invalidate the previously selected engine this->SelectEngine(INVALID_ENGINE); - } else if (!this->eng_list.Contains(this->sel_engine)) { // previously selected engine didn't pass the filter, select the first engine of the list + } else if (std::find(this->eng_list.begin(), this->eng_list.end(), this->sel_engine) == this->eng_list.end()) { // previously selected engine didn't pass the filter, select the first engine of the list this->SelectEngine(this->eng_list[0]); } } |