From 9fe21fcd8883b37bdc30224822e6e42afb35b8f0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 7 Feb 2016 16:18:13 +0300 Subject: Replace most static_cast to shorter versions from defines. --- src/graphicsvertexes.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/graphicsvertexes.cpp') diff --git a/src/graphicsvertexes.cpp b/src/graphicsvertexes.cpp index 21461f052..fd4213e0e 100644 --- a/src/graphicsvertexes.cpp +++ b/src/graphicsvertexes.cpp @@ -100,7 +100,7 @@ void OpenGLGraphicsVertexes::clear() restrict2 } mIntTexPool.clear(); - const int sz = static_cast(mVbo.size()); + const int sz = CAST_S32(mVbo.size()); if (sz > 0) { mainGraphics->removeArray(sz, &mVbo[0]); @@ -129,28 +129,28 @@ void OpenGLGraphicsVertexes::init() restrict2 GLfloat *OpenGLGraphicsVertexes::switchFloatTexArray() restrict2 { - mFloatTexArray = new GLfloat[static_cast(vertexBufSize * 4 + 30)]; + mFloatTexArray = new GLfloat[CAST_SIZE(vertexBufSize * 4 + 30)]; mFloatTexPool.push_back(mFloatTexArray); return mFloatTexArray; } GLint *OpenGLGraphicsVertexes::switchIntVertArray() restrict2 { - mIntVertArray = new GLint[static_cast(vertexBufSize * 4 + 30)]; + mIntVertArray = new GLint[CAST_SIZE(vertexBufSize * 4 + 30)]; mIntVertPool.push_back(mIntVertArray); return mIntVertArray; } GLshort *OpenGLGraphicsVertexes::switchShortVertArray() restrict2 { - mShortVertArray = new GLshort[static_cast(vertexBufSize * 4 + 30)]; + mShortVertArray = new GLshort[CAST_SIZE(vertexBufSize * 4 + 30)]; mShortVertPool.push_back(mShortVertArray); return mShortVertArray; } GLint *OpenGLGraphicsVertexes::switchIntTexArray() restrict2 { - mIntTexArray = new GLint[static_cast(vertexBufSize * 4 + 30)]; + mIntTexArray = new GLint[CAST_SIZE(vertexBufSize * 4 + 30)]; mIntTexPool.push_back(mIntTexArray); return mIntTexArray; } @@ -185,7 +185,7 @@ GLfloat *OpenGLGraphicsVertexes::continueFloatTexArray() restrict2 { if (mFloatTexPool.empty()) { - mFloatTexArray = new GLfloat[static_cast( + mFloatTexArray = new GLfloat[CAST_SIZE( vertexBufSize * 4 + 30)]; mFloatTexPool.push_back(mFloatTexArray); } @@ -200,7 +200,7 @@ GLint *OpenGLGraphicsVertexes::continueIntVertArray() restrict2 { if (mIntVertPool.empty()) { - mIntVertArray = new GLint[static_cast(vertexBufSize * 4 + 30)]; + mIntVertArray = new GLint[CAST_SIZE(vertexBufSize * 4 + 30)]; mIntVertPool.push_back(mIntVertArray); } else @@ -214,7 +214,7 @@ GLshort *OpenGLGraphicsVertexes::continueShortVertArray() restrict2 { if (mShortVertPool.empty()) { - mShortVertArray = new GLshort[static_cast( + mShortVertArray = new GLshort[CAST_SIZE( vertexBufSize * 4 + 30)]; mShortVertPool.push_back(mShortVertArray); } @@ -229,7 +229,7 @@ GLint *OpenGLGraphicsVertexes::continueIntTexArray() restrict2 { if (mIntTexPool.empty()) { - mIntTexArray = new GLint[static_cast(vertexBufSize * 4 + 30)]; + mIntTexArray = new GLint[CAST_SIZE(vertexBufSize * 4 + 30)]; mIntTexPool.push_back(mIntTexArray); } else -- cgit v1.2.3-60-g2f50