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

@@ -304,7 +304,7 @@ RailType GetRailTypeByLabel(RailTypeLabel label, bool allow_alternate_labels)
/* Test if any rail type defines the label as an alternate. */
for (RailType r = RAILTYPE_BEGIN; r != RAILTYPE_END; r++) {
const RailtypeInfo *rti = GetRailTypeInfo(r);
if (rti->alternate_labels.Contains(label)) return r;
if (std::find(rti->alternate_labels.begin(), rti->alternate_labels.end(), label) != rti->alternate_labels.end()) return r;
}
}