diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-07 16:18:13 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-07 16:18:13 +0300 |
commit | 9fe21fcd8883b37bdc30224822e6e42afb35b8f0 (patch) | |
tree | 798117abd4dc7e610997d59d530a96ddc1509f53 /src/graphicsvertexes.cpp | |
parent | 4429cb14e9e187edef27aba692a4266733f79c17 (diff) | |
download | manaplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz manaplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2 manaplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz manaplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip |
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/graphicsvertexes.cpp')
-rw-r--r-- | src/graphicsvertexes.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
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<int>(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<size_t>(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<size_t>(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<size_t>(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<size_t>(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<size_t>( + 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<size_t>(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<size_t>( + 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<size_t>(vertexBufSize * 4 + 30)]; + mIntTexArray = new GLint[CAST_SIZE(vertexBufSize * 4 + 30)]; mIntTexPool.push_back(mIntTexArray); } else |