diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mapmanager.cpp | 13 | ||||
-rw-r--r-- | src/mapmanager.h | 3 |
2 files changed, 5 insertions, 11 deletions
diff --git a/src/mapmanager.cpp b/src/mapmanager.cpp index 081ad508..73f8822e 100644 --- a/src/mapmanager.cpp +++ b/src/mapmanager.cpp @@ -92,17 +92,10 @@ Map *MapManager::getMap(const unsigned int mapId) return result; } -bool MapManager::isLoaded(const unsigned int mapId) const +bool +MapManager::isLoaded(const unsigned int mapId) const { - bool ret = false; - std::map<unsigned int, Map *>::const_iterator i; - - i = maps.find(mapId); - if (i != maps.end()) - { - ret = true; - } - return ret; + return maps.find(mapId) != maps.end(); } diff --git a/src/mapmanager.h b/src/mapmanager.h index 3347ae27..d516b4ce 100644 --- a/src/mapmanager.h +++ b/src/mapmanager.h @@ -66,7 +66,8 @@ class MapManager: public utils::Singleton<MapManager> /** * Check if a map was already loaded. */ - bool isLoaded(unsigned int mapId) const; + bool + isLoaded(unsigned int mapId) const; protected: /** |