summaryrefslogtreecommitdiff
path: root/src/rail.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/rail.cpp
parentb1f5119d3af2fb47a2f1c752d61a742f41076451 (diff)
downloadopenttd-5795f66d2eebccbc8e04b80ebaf163f636479f9e.tar.xz
Codechange: Replaced SmallVector::Contains() with std::find() pattern
Diffstat (limited to 'src/rail.cpp')
-rw-r--r--src/rail.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rail.cpp b/src/rail.cpp
index 8bd7aa518..c97dfb53c 100644
--- a/src/rail.cpp
+++ b/src/rail.cpp
@@ -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;
}
}