diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-01-18 21:04:14 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-01-18 21:04:14 +0000 |
commit | 3902362acd1ce9432368b561fc00f7b691856ed2 (patch) | |
tree | f57ad726bba38a954d7dd4650cfba9c823b90d2b /src | |
parent | 2c1461de62e85772143fd58b7a13f1a8a964c930 (diff) | |
download | manaserv-3902362acd1ce9432368b561fc00f7b691856ed2.tar.gz manaserv-3902362acd1ce9432368b561fc00f7b691856ed2.tar.bz2 manaserv-3902362acd1ce9432368b561fc00f7b691856ed2.tar.xz manaserv-3902362acd1ce9432368b561fc00f7b691856ed2.zip |
Some insignificant changes to usage of the const keyword.
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 1 | ||||
-rw-r--r-- | src/mapmanager.cpp | 6 | ||||
-rw-r--r-- | src/mapmanager.h | 12 |
3 files changed, 10 insertions, 9 deletions
diff --git a/src/main.cpp b/src/main.cpp index 720417c4..6088654f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -189,6 +189,7 @@ void initialize() exit(1); } + // Reset to default segmentation fault handling for debugging purposes signal(SIGSEGV, SIG_DFL); // set SDL to quit on exit. diff --git a/src/mapmanager.cpp b/src/mapmanager.cpp index 360503f9..081ad508 100644 --- a/src/mapmanager.cpp +++ b/src/mapmanager.cpp @@ -92,17 +92,17 @@ Map *MapManager::getMap(const unsigned int mapId) return result; } -bool MapManager::isLoaded(const unsigned int mapId) +bool MapManager::isLoaded(const unsigned int mapId) const { bool ret = false; - std::map<unsigned int, Map *>::iterator i; + std::map<unsigned int, Map *>::const_iterator i; i = maps.find(mapId); if (i != maps.end()) { ret = true; } - return ret; + return ret; } diff --git a/src/mapmanager.h b/src/mapmanager.h index ede3ec6f..3347ae27 100644 --- a/src/mapmanager.h +++ b/src/mapmanager.h @@ -46,27 +46,27 @@ class MapManager: public utils::Singleton<MapManager> /** * Load the specified map */ - Map *loadMap(const unsigned int mapId); + Map *loadMap(unsigned int mapId); /** * Unload the specified map */ - void unloadMap(const unsigned int mapId); + void unloadMap(unsigned int mapId); /** * Reload the specified map */ - void reloadMap(const unsigned int mapId); + void reloadMap(unsigned int mapId); /** * Return the requested map */ - Map *getMap(const unsigned int mapId); - + Map *getMap(unsigned int mapId); + /** * Check if a map was already loaded. */ - bool isLoaded(const unsigned int mapId); + bool isLoaded(unsigned int mapId) const; protected: /** |