Codechange: Replaced SmallVector::Contains() with std::find() pattern

This commit is contained in:
Henry Wilson
2019-02-12 22:59:12 +00:00
committed by PeterN
parent b1f5119d3a
commit 5795f66d2e
8 changed files with 16 additions and 25 deletions

View File

@@ -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;