forked from mirror/OpenTTD
Codechange: Use std::map instead of custom SmallMap.
This commit is contained in:
@@ -3645,7 +3645,7 @@ Town *ClosestTownFromTile(TileIndex tile, uint threshold)
|
||||
}
|
||||
|
||||
static bool _town_rating_test = false; ///< If \c true, town rating is in test-mode.
|
||||
static SmallMap<const Town *, int> _town_test_ratings; ///< Map of towns to modified ratings, while in town rating test-mode.
|
||||
static std::map<const Town *, int> _town_test_ratings; ///< Map of towns to modified ratings, while in town rating test-mode.
|
||||
|
||||
/**
|
||||
* Switch the town rating to test-mode, to allow commands to be tested without affecting current ratings.
|
||||
@@ -3675,8 +3675,8 @@ void SetTownRatingTestMode(bool mode)
|
||||
static int GetRating(const Town *t)
|
||||
{
|
||||
if (_town_rating_test) {
|
||||
SmallMap<const Town *, int>::iterator it = _town_test_ratings.Find(t);
|
||||
if (it != _town_test_ratings.End()) {
|
||||
auto it = _town_test_ratings.find(t);
|
||||
if (it != _town_test_ratings.end()) {
|
||||
return it->second;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user