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/subimage.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/resources/subimage.cpp') diff --git a/src/resources/subimage.cpp b/src/resources/subimage.cpp index 33177909b..af579e4ec 100644 --- a/src/resources/subimage.cpp +++ b/src/resources/subimage.cpp @@ -60,10 +60,10 @@ SubImage::SubImage(Image *const parent, } // Set up the rectangle. - mBounds.x = static_cast(x); - mBounds.y = static_cast(y); - mBounds.w = static_cast(width); - mBounds.h = static_cast(height); + mBounds.x = CAST_S16(x); + mBounds.y = CAST_S16(y); + mBounds.w = CAST_U16(width); + mBounds.h = CAST_U16(height); if (mParent) { mInternalBounds.x = mParent->mBounds.x; @@ -114,10 +114,10 @@ SubImage::SubImage(Image *const parent, } // Set up the rectangle. - mBounds.x = static_cast(x); - mBounds.y = static_cast(y); - mBounds.w = static_cast(width); - mBounds.h = static_cast(height); + mBounds.x = CAST_S16(x); + mBounds.y = CAST_S16(y); + mBounds.w = CAST_U16(width); + mBounds.h = CAST_U16(height); if (mParent) { mInternalBounds.x = mParent->mBounds.x; @@ -149,10 +149,10 @@ SubImage::SubImage(Image *const parent, mParent->incRef(); // Set up the rectangle. - mBounds.x = static_cast(x); - mBounds.y = static_cast(y); - mBounds.w = static_cast(width); - mBounds.h = static_cast(height); + mBounds.x = CAST_S16(x); + mBounds.y = CAST_S16(y); + mBounds.w = CAST_U16(width); + mBounds.h = CAST_U16(height); if (mParent) { mInternalBounds.x = mParent->mBounds.x; -- cgit v1.2.3-70-g09d2