forked from mirror/OpenTTD
Fix 801cbea9c
: operator< is not always the best idea
Also removes unused and anyway broken SmallMap::SortByKey() function.
This commit is contained in:
@@ -164,16 +164,6 @@ struct SmallMap : std::vector<SmallPair<T, U> > {
|
||||
n.first = key;
|
||||
return n.second;
|
||||
}
|
||||
|
||||
inline void SortByKey()
|
||||
{
|
||||
std::sort(std::vector<Pair>::begin(), std::vector<Pair>::end());
|
||||
}
|
||||
|
||||
bool operator< (const Pair &other) const
|
||||
{
|
||||
return (*this).first < other.first;
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* SMALLMAP_TYPE_HPP */
|
||||
|
Reference in New Issue
Block a user