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/render/graphics.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/render/graphics.cpp') 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(w1 / mScale); - mRect.h = static_cast(h1 / mScale); + mRect.w = CAST_S32(w1 / mScale); + mRect.h = CAST_S32(h1 / mScale); createGLContext(); #else // USE_SDL2 createGLContext(); - mRect.w = static_cast(mWindow->w / mScale); - mRect.h = static_cast(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(width / mScale); - mRect.h = static_cast(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(width / mScale); - mRect.h = static_cast(height / mScale); + mRect.w = CAST_S32(width / mScale); + mRect.h = CAST_S32(height / mScale); mWidth = width / mScale; mHeight = height / mScale; mActualWidth = width; -- cgit v1.2.3-60-g2f50