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/render/graphics.cpp | |
parent | 4429cb14e9e187edef27aba692a4266733f79c17 (diff) | |
download | manaverse-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/render/graphics.cpp')
-rw-r--r-- | src/render/graphics.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/render/graphics.cpp b/src/render/graphics.cpp index 5052b7489..d01813fb3 100644 --- a/src/render/graphics.cpp +++ b/src/render/graphics.cpp @@ -281,15 +281,15 @@ bool Graphics::setOpenGLMode() restrict2 int w1 = 0; int h1 = 0; SDL_GetWindowSize(mWindow, &w1, &h1); - mRect.w = static_cast<int32_t>(w1 / mScale); - mRect.h = static_cast<int32_t>(h1 / mScale); + mRect.w = CAST_S32(w1 / mScale); + mRect.h = CAST_S32(h1 / mScale); createGLContext(); #else // USE_SDL2 createGLContext(); - mRect.w = static_cast<uint16_t>(mWindow->w / mScale); - mRect.h = static_cast<uint16_t>(mWindow->h / mScale); + mRect.w = CAST_U16(mWindow->w / mScale); + mRect.h = CAST_U16(mWindow->h / mScale); #endif // USE_SDL2 @@ -514,8 +514,8 @@ bool Graphics::resizeScreen(const int width, #ifdef USE_SDL2 endDraw(); - mRect.w = static_cast<int32_t>(width / mScale); - mRect.h = static_cast<int32_t>(height / mScale); + mRect.w = CAST_S32(width / mScale); + mRect.h = CAST_S32(height / mScale); mWidth = width / mScale; mHeight = height / mScale; mActualWidth = width; @@ -545,8 +545,8 @@ bool Graphics::resizeScreen(const int width, #ifdef __native_client__ if (mOpenGL != RENDER_SOFTWARE) { - mRect.w = static_cast<int32_t>(width / mScale); - mRect.h = static_cast<int32_t>(height / mScale); + mRect.w = CAST_S32(width / mScale); + mRect.h = CAST_S32(height / mScale); mWidth = width / mScale; mHeight = height / mScale; mActualWidth = width; |