Made Settings Getter/Setter macro more g++-friendly.

This commit is contained in:
Aloshi 2013-06-19 18:31:59 -05:00
parent f651ea401c
commit 56569e5425

View file

@ -83,7 +83,7 @@ void Settings::loadFile()
} }
//Print a warning message if the setting we're trying to get doesn't already exist in the map, then return the value in the map. //Print a warning message if the setting we're trying to get doesn't already exist in the map, then return the value in the map.
#define SETTINGS_GETSET(type, mapName, getMethodName, setMethodName) type Settings::##getMethodName##(const std::string& name) \ #define SETTINGS_GETSET(type, mapName, getMethodName, setMethodName) type Settings::getMethodName(const std::string& name) \
{ \ { \
if(mapName.find(name) == mapName.end()) \ if(mapName.find(name) == mapName.end()) \
{ \ { \
@ -91,7 +91,7 @@ void Settings::loadFile()
} \ } \
return mapName[name]; \ return mapName[name]; \
} \ } \
void Settings::##setMethodName##(const std::string& name, type value) \ void Settings::setMethodName(const std::string& name, type value) \
{ \ { \
mapName[name] = value; \ mapName[name] = value; \
} }