summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2019-04-12 01:28:11 +0200
committerPeterN <peter@fuzzle.org>2019-04-13 12:49:18 +0100
commit801cbea9cce1e04e6921bb087add8206cffe1fe1 (patch)
tree9ac04e07320af1b5bd0fa8e822ec571e6bd58303 /src/core
parent5b77102b63f77bfbad02ae3383b87fbef6e60e7d (diff)
downloadopenttd-801cbea9cce1e04e6921bb087add8206cffe1fe1.tar.xz
Codechange: use std::sort() for all std::vector types
Diffstat (limited to 'src/core')
-rw-r--r--src/core/smallmap_type.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/smallmap_type.hpp b/src/core/smallmap_type.hpp
index bdb6ed475..7581fc6a7 100644
--- a/src/core/smallmap_type.hpp
+++ b/src/core/smallmap_type.hpp
@@ -167,12 +167,12 @@ struct SmallMap : std::vector<SmallPair<T, U> > {
inline void SortByKey()
{
- QSortT(std::vector<Pair>::data(), std::vector<Pair>::size(), KeySorter);
+ std::sort(std::vector<Pair>::begin(), std::vector<Pair>::end());
}
- static int CDECL KeySorter(const Pair *a, const Pair *b)
+ bool operator< (const Pair &other) const
{
- return a->first - b->first;
+ return (*this).first < other.first;
}
};