Codechange: use std::sort() for all std::vector types

This commit is contained in:
glx
2019-04-12 01:28:11 +02:00
committed by PeterN
parent 5b77102b63
commit 801cbea9cc
5 changed files with 24 additions and 25 deletions

View File

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