summaryrefslogtreecommitdiff
path: root/src/station_type.h
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2019-02-24 18:52:15 +0000
committerPeterN <peter@fuzzle.org>2019-03-09 16:33:47 +0000
commited6084523d546641d4ec9ff5f560387d7c40670f (patch)
treeec96379c0b76df7b6da28e4c33e16ed7d72eef3e /src/station_type.h
parent46aca9377b01a6626a972151e6fc4c62eec76ba7 (diff)
downloadopenttd-ed6084523d546641d4ec9ff5f560387d7c40670f.tar.xz
Codechange: Convert StationList from SmallVector to std::set.
Diffstat (limited to 'src/station_type.h')
-rw-r--r--src/station_type.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/station_type.h b/src/station_type.h
index 495e95a08..42d64fcf8 100644
--- a/src/station_type.h
+++ b/src/station_type.h
@@ -12,9 +12,9 @@
#ifndef STATION_TYPE_H
#define STATION_TYPE_H
-#include "core/smallvec_type.hpp"
#include "core/smallstack_type.hpp"
#include "tilearea_type.h"
+#include <set>
typedef uint16 StationID;
typedef uint16 RoadStopID;
@@ -90,8 +90,12 @@ enum CatchmentArea {
static const uint MAX_LENGTH_STATION_NAME_CHARS = 32; ///< The maximum length of a station name in characters including '\0'
+struct StationCompare {
+ bool operator() (const Station *lhs, const Station *rhs) const;
+};
+
/** List of stations */
-typedef SmallVector<Station *, 2> StationList;
+typedef std::set<Station *, StationCompare> StationList;
/**
* Structure contains cached list of stations nearby. The list