summaryrefslogtreecommitdiff
path: root/src/configmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-07 16:18:13 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-07 16:18:13 +0300
commit9fe21fcd8883b37bdc30224822e6e42afb35b8f0 (patch)
tree798117abd4dc7e610997d59d530a96ddc1509f53 /src/configmanager.cpp
parent4429cb14e9e187edef27aba692a4266733f79c17 (diff)
downloadmanaverse-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz
manaverse-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2
manaverse-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz
manaverse-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/configmanager.cpp')
-rw-r--r--src/configmanager.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/configmanager.cpp b/src/configmanager.cpp
index b5e80e5e9..b412d1044 100644
--- a/src/configmanager.cpp
+++ b/src/configmanager.cpp
@@ -89,16 +89,16 @@ void ConfigManager::initConfiguration()
config.setValue("hwaccel", false);
#ifdef USE_OPENGL
#if (defined __APPLE__)
- config.setValue("opengl", static_cast<int>(RENDER_NORMAL_OPENGL));
+ config.setValue("opengl", CAST_S32(RENDER_NORMAL_OPENGL));
#elif (defined ANDROID)
- config.setValue("opengl", static_cast<int>(RENDER_GLES_OPENGL));
+ config.setValue("opengl", CAST_S32(RENDER_GLES_OPENGL));
#elif (defined WIN32)
- config.setValue("opengl", static_cast<int>(RENDER_SAFE_OPENGL));
+ config.setValue("opengl", CAST_S32(RENDER_SAFE_OPENGL));
#else
- config.setValue("opengl", static_cast<int>(RENDER_SOFTWARE));
+ config.setValue("opengl", CAST_S32(RENDER_SOFTWARE));
#endif
#else
- config.setValue("opengl", static_cast<int>(RENDER_SOFTWARE));
+ config.setValue("opengl", CAST_S32(RENDER_SOFTWARE));
#endif
config.setValue("screen", false);
config.setValue("sound", true);
@@ -174,7 +174,7 @@ void ConfigManager::storeSafeParameters()
tmpOpengl = intToRenderType(config.getIntValue("opengl"));
- config.setValue("opengl", static_cast<int>(RENDER_SOFTWARE));
+ config.setValue("opengl", CAST_S32(RENDER_SOFTWARE));
config.write();
@@ -185,7 +185,7 @@ void ConfigManager::storeSafeParameters()
}
config.setValue("safemode", false);
- config.setValue("opengl", static_cast<int>(tmpOpengl));
+ config.setValue("opengl", CAST_S32(tmpOpengl));
}
#elif !defined(ANDROID)
void ConfigManager::storeSafeParameters()
@@ -264,9 +264,9 @@ void ConfigManager::storeSafeParameters()
config.setValue("screenheight", 480);
}
#if defined(__APPLE__)
- config.setValue("opengl", static_cast<int>(RENDER_NORMAL_OPENGL));
+ config.setValue("opengl", CAST_S32(RENDER_NORMAL_OPENGL));
#else
- config.setValue("opengl", static_cast<int>(RENDER_SOFTWARE));
+ config.setValue("opengl", CAST_S32(RENDER_SOFTWARE));
#endif
config.write();
@@ -281,7 +281,7 @@ void ConfigManager::storeSafeParameters()
if (!tmpOpengl)
{
config.setValue("hwaccel", tmpHwaccel);
- config.setValue("opengl", static_cast<int>(tmpOpengl));
+ config.setValue("opengl", CAST_S32(tmpOpengl));
config.setValue("fpslimit", tmpFpslimit);
config.setValue("altfpslimit", tmpAltFpslimit);
config.setValue("sound", tmpSound);
@@ -301,7 +301,7 @@ void ConfigManager::storeSafeParameters()
}
else
{
- config.setValue("opengl", static_cast<int>(tmpOpengl));
+ config.setValue("opengl", CAST_S32(tmpOpengl));
config.setValue("screenwidth", width);
config.setValue("screenheight", height);
}
@@ -346,7 +346,7 @@ void ConfigManager::checkConfigVersion()
{
if (config.getIntValue("speech") == BeingSpeech::TEXT_OVERHEAD)
{
- config.setValue("speech", static_cast<int>(
+ config.setValue("speech", CAST_S32(
BeingSpeech::NO_NAME_IN_BUBBLE));
}
}