mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 07:05:39 +00:00
Made Settings Getter/Setter macro more g++-friendly.
This commit is contained in:
parent
f651ea401c
commit
56569e5425
|
@ -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.
|
||||
#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()) \
|
||||
{ \
|
||||
|
@ -91,7 +91,7 @@ void Settings::loadFile()
|
|||
} \
|
||||
return mapName[name]; \
|
||||
} \
|
||||
void Settings::##setMethodName##(const std::string& name, type value) \
|
||||
void Settings::setMethodName(const std::string& name, type value) \
|
||||
{ \
|
||||
mapName[name] = value; \
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue