summaryrefslogtreecommitdiff
path: root/src/resources/sdlimagehelper.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-07 16:18:13 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-07 16:18:13 +0300
commit9fe21fcd8883b37bdc30224822e6e42afb35b8f0 (patch)
tree798117abd4dc7e610997d59d530a96ddc1509f53 /src/resources/sdlimagehelper.cpp
parent4429cb14e9e187edef27aba692a4266733f79c17 (diff)
downloadplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz
plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2
plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz
plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/resources/sdlimagehelper.cpp')
-rw-r--r--src/resources/sdlimagehelper.cpp6
1 files changed, 3 insertions, 3 deletions
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<const uint8_t>((v << fmt->Aloss)
+ (v >> (8 - (fmt->Aloss << 1))));
- const uint8_t a2 = static_cast<uint8_t>(
+ const uint8_t a2 = CAST_U8(
static_cast<float>(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<int16_t>(x), static_cast<int16_t>(y),
- static_cast<uint16_t>(surface->w), static_cast<uint16_t>(surface->h)
+ CAST_S16(x), CAST_S16(y),
+ CAST_U16(surface->w), static_cast<uint16_t>(surface->h)
};
SDL_BlitSurface(surface, nullptr, image->mSDLSurface, &rect);