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/resources/sdlimagehelper.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/resources/sdlimagehelper.cpp') diff --git a/src/resources/sdlimagehelper.cpp b/src/resources/sdlimagehelper.cpp index e0901f178..e61391d14 100644 --- a/src/resources/sdlimagehelper.cpp +++ b/src/resources/sdlimagehelper.cpp @@ -137,7 +137,7 @@ Image *SDLImageHelper::createTextSurface(SDL_Surface *const tmpImage, const uint8_t a = static_cast((v << fmt->Aloss) + (v >> (8 - (fmt->Aloss << 1)))); - const uint8_t a2 = static_cast( + const uint8_t a2 = CAST_U8( static_cast(a) * alpha); c &= ~fmt->Amask; @@ -297,8 +297,8 @@ void SDLImageHelper::copySurfaceToImage(const Image *const image, SDL_SetAlpha(surface, 0, SDL_ALPHA_OPAQUE); SDL_Rect rect = { - static_cast(x), static_cast(y), - static_cast(surface->w), static_cast(surface->h) + CAST_S16(x), CAST_S16(y), + CAST_U16(surface->w), static_cast(surface->h) }; SDL_BlitSurface(surface, nullptr, image->mSDLSurface, &rect); -- cgit v1.2.3-70-g09d2