summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp1
-rw-r--r--src/mapmanager.cpp6
-rw-r--r--src/mapmanager.h12
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:
/**