summaryrefslogtreecommitdiff
path: root/src/vehicle_cmd.cpp
diff options
context:
space:
mode:
authorHenry Wilson <m3henry@googlemail.com>2019-02-12 22:59:12 +0000
committerPeterN <peter@fuzzle.org>2019-03-26 20:15:57 +0000
commit5795f66d2eebccbc8e04b80ebaf163f636479f9e (patch)
tree53bedfa6e40953f7aaeba3f7c2648e0839aef354 /src/vehicle_cmd.cpp
parentb1f5119d3af2fb47a2f1c752d61a742f41076451 (diff)
downloadopenttd-5795f66d2eebccbc8e04b80ebaf163f636479f9e.tar.xz
Codechange: Replaced SmallVector::Contains() with std::find() pattern
Diffstat (limited to 'src/vehicle_cmd.cpp')
-rw-r--r--src/vehicle_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vehicle_cmd.cpp b/src/vehicle_cmd.cpp
index ccc9446a0..636aadb49 100644
--- a/src/vehicle_cmd.cpp
+++ b/src/vehicle_cmd.cpp
@@ -355,7 +355,7 @@ static CommandCost RefitVehicle(Vehicle *v, bool only_this, uint8 num_vehicles,
/* Reset actual_subtype for every new vehicle */
if (!v->IsArticulatedPart()) actual_subtype = new_subtype;
- if (v->type == VEH_TRAIN && !vehicles_to_refit.Contains(v->index) && !only_this) continue;
+ if (v->type == VEH_TRAIN && std::find(vehicles_to_refit.begin(), vehicles_to_refit.end(), v->index) == vehicles_to_refit.end() && !only_this) continue;
const Engine *e = v->GetEngine();
if (!e->CanCarryCargo()) continue;