summaryrefslogtreecommitdiff
path: root/src/test/testmain.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/test/testmain.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/test/testmain.cpp')
-rw-r--r--src/test/testmain.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/test/testmain.cpp b/src/test/testmain.cpp
index 5613285ab..81621fb06 100644
--- a/src/test/testmain.cpp
+++ b/src/test/testmain.cpp
@@ -234,22 +234,22 @@ int TestMain::exec(const bool testAudio)
if (!invokeNormalOpenBatchTest("14"))
{
- textureSize[static_cast<size_t>(RENDER_NORMAL_OPENGL)]
+ textureSize[CAST_SIZE(RENDER_NORMAL_OPENGL)]
= readValue2(14);
}
if (!invokeModernOpenBatchTest("15"))
{
- textureSize[static_cast<size_t>(RENDER_MODERN_OPENGL)]
+ textureSize[CAST_SIZE(RENDER_MODERN_OPENGL)]
= readValue2(15);
}
if (!invokeSafeOpenBatchTest("16"))
{
- textureSize[static_cast<size_t>(RENDER_SAFE_OPENGL)]
+ textureSize[CAST_SIZE(RENDER_SAFE_OPENGL)]
= readValue2(16);
}
if (!invokeMobileOpenBatchTest("20"))
{
- textureSize[static_cast<size_t>(RENDER_GLES_OPENGL)]
+ textureSize[CAST_SIZE(RENDER_GLES_OPENGL)]
= readValue2(20);
}
for (int f = 0; f < 6; f ++)
@@ -264,7 +264,7 @@ int TestMain::exec(const bool testAudio)
if (!(detectMode & 15))
openGLMode = RENDER_SOFTWARE;
- writeConfig(openGLMode, rescaleTest[static_cast<size_t>(openGLMode)],
+ writeConfig(openGLMode, rescaleTest[CAST_SIZE(openGLMode)],
soundTest, info, batchSize, textureSizeStr, detectMode);
return 0;
}
@@ -279,10 +279,10 @@ void TestMain::writeConfig(const RenderType openGLMode,
{
mConfig.init(settings.configDir + "/config.xml");
- log->log("set mode to %d", static_cast<int>(openGLMode));
+ log->log("set mode to %d", CAST_S32(openGLMode));
// searched values
- mConfig.setValue("opengl", static_cast<int>(openGLMode));
+ mConfig.setValue("opengl", CAST_S32(openGLMode));
mConfig.setValue("showBackground", !rescale);
mConfig.setValue("sound", !sound);
@@ -341,7 +341,7 @@ int TestMain::readValue(const int ver, int def)
int TestMain::invokeTest(const std::string &test)
{
- mConfig.setValue("opengl", static_cast<int>(RENDER_SOFTWARE));
+ mConfig.setValue("opengl", CAST_S32(RENDER_SOFTWARE));
mConfig.write();
const int ret = execFileWait(fileName, fileName, "-t", test);
@@ -359,7 +359,7 @@ int TestMain::invokeTest4()
int TestMain::invokeSoftwareRenderTest(const std::string &test)
{
- mConfig.setValue("opengl", static_cast<int>(RENDER_SOFTWARE));
+ mConfig.setValue("opengl", CAST_S32(RENDER_SOFTWARE));
mConfig.write();
const int ret = execFileWait(fileName, fileName, "-t", test, 30);
log->log("%s: %d", test.c_str(), ret);
@@ -368,7 +368,7 @@ int TestMain::invokeSoftwareRenderTest(const std::string &test)
int TestMain::invokeNormalOpenGLRenderTest(const std::string &test)
{
- mConfig.setValue("opengl", static_cast<int>(RENDER_NORMAL_OPENGL));
+ mConfig.setValue("opengl", CAST_S32(RENDER_NORMAL_OPENGL));
mConfig.write();
const int ret = execFileWait(fileName, fileName, "-t", test, 30);
log->log("%s: %d", test.c_str(), ret);
@@ -377,7 +377,7 @@ int TestMain::invokeNormalOpenGLRenderTest(const std::string &test)
int TestMain::invokeModernOpenGLRenderTest(const std::string &test)
{
- mConfig.setValue("opengl", static_cast<int>(RENDER_MODERN_OPENGL));
+ mConfig.setValue("opengl", CAST_S32(RENDER_MODERN_OPENGL));
mConfig.write();
const int ret = execFileWait(fileName, fileName, "-t", test, 30);
log->log("%s: %d", test.c_str(), ret);
@@ -386,7 +386,7 @@ int TestMain::invokeModernOpenGLRenderTest(const std::string &test)
int TestMain::invokeNormalOpenBatchTest(const std::string &test)
{
- mConfig.setValue("opengl", static_cast<int>(RENDER_NORMAL_OPENGL));
+ mConfig.setValue("opengl", CAST_S32(RENDER_NORMAL_OPENGL));
mConfig.write();
const int ret = execFileWait(fileName, fileName, "-t", test, 30);
// log->log("%s: %d", test.c_str(), ret);
@@ -395,7 +395,7 @@ int TestMain::invokeNormalOpenBatchTest(const std::string &test)
int TestMain::invokeModernOpenBatchTest(const std::string &test)
{
- mConfig.setValue("opengl", static_cast<int>(RENDER_MODERN_OPENGL));
+ mConfig.setValue("opengl", CAST_S32(RENDER_MODERN_OPENGL));
mConfig.write();
const int ret = execFileWait(fileName, fileName, "-t", test, 30);
// log->log("%s: %d", test.c_str(), ret);
@@ -404,7 +404,7 @@ int TestMain::invokeModernOpenBatchTest(const std::string &test)
int TestMain::invokeMobileOpenBatchTest(const std::string &test)
{
- mConfig.setValue("opengl", static_cast<int>(RENDER_GLES_OPENGL));
+ mConfig.setValue("opengl", CAST_S32(RENDER_GLES_OPENGL));
mConfig.write();
const int ret = execFileWait(fileName, fileName, "-t", test, 30);
// log->log("%s: %d", test.c_str(), ret);
@@ -413,7 +413,7 @@ int TestMain::invokeMobileOpenBatchTest(const std::string &test)
int TestMain::invokeSafeOpenBatchTest(const std::string &test)
{
- mConfig.setValue("opengl", static_cast<int>(RENDER_SAFE_OPENGL));
+ mConfig.setValue("opengl", CAST_S32(RENDER_SAFE_OPENGL));
mConfig.write();
const int ret = execFileWait(fileName, fileName, "-t", test, 30);
// log->log("%s: %d", test.c_str(), ret);
@@ -422,7 +422,7 @@ int TestMain::invokeSafeOpenBatchTest(const std::string &test)
int TestMain::invokeSafeOpenGLRenderTest(const std::string &test)
{
- mConfig.setValue("opengl", static_cast<int>(RENDER_SAFE_OPENGL));
+ mConfig.setValue("opengl", CAST_S32(RENDER_SAFE_OPENGL));
mConfig.write();
const int ret = execFileWait(fileName, fileName, "-t", test, 30);
log->log("%s: %d", test.c_str(), ret);