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/gui/widgets/progressbar.cpp | |
parent | 4429cb14e9e187edef27aba692a4266733f79c17 (diff) | |
download | mv-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz mv-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2 mv-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz mv-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip |
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/gui/widgets/progressbar.cpp')
-rw-r--r-- | src/gui/widgets/progressbar.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp index 03db3f97e..455ccc31c 100644 --- a/src/gui/widgets/progressbar.cpp +++ b/src/gui/widgets/progressbar.cpp @@ -161,7 +161,7 @@ void ProgressBar::draw(Graphics *graphics) } updateAlpha(); - mBackgroundColor.a = static_cast<unsigned int>(mAlpha * 255); + mBackgroundColor.a = CAST_U32(mAlpha * 255); if (mRedraw || graphics->getRedraw()) { @@ -173,7 +173,7 @@ void ProgressBar::draw(Graphics *graphics) { const unsigned int pad = 2 * mFillPadding; const int maxWidth = mDimension.width - pad; - int width = static_cast<int>(mProgress + int width = CAST_S32(mProgress * static_cast<float>(maxWidth)); if (width > 0) { @@ -194,7 +194,7 @@ void ProgressBar::draw(Graphics *graphics) graphics->setColor(mBackgroundColor); const unsigned int pad = 2 * mFillPadding; const int maxWidth = mDimension.width - pad; - int width = static_cast<int>(mProgress * static_cast<float>(maxWidth)); + int width = CAST_S32(mProgress * static_cast<float>(maxWidth)); if (width > 0) { if (width > maxWidth) @@ -240,7 +240,7 @@ void ProgressBar::safeDraw(Graphics *graphics) } updateAlpha(); - mBackgroundColor.a = static_cast<unsigned int>(mAlpha * 255); + mBackgroundColor.a = CAST_U32(mAlpha * 255); graphics->drawImageRect(0, 0, mDimension.width, mDimension.height, mSkin->getBorder()); @@ -248,7 +248,7 @@ void ProgressBar::safeDraw(Graphics *graphics) { const unsigned int pad = 2 * mFillPadding; const int maxWidth = mDimension.width - pad; - int width = static_cast<int>(mProgress + int width = CAST_S32(mProgress * static_cast<float>(maxWidth)); if (width > 0) { @@ -265,7 +265,7 @@ void ProgressBar::safeDraw(Graphics *graphics) graphics->setColor(mBackgroundColor); const unsigned int pad = 2 * mFillPadding; const int maxWidth = mDimension.width - pad; - int width = static_cast<int>(mProgress * static_cast<float>(maxWidth)); + int width = CAST_S32(mProgress * static_cast<float>(maxWidth)); if (width > 0) { if (width > maxWidth) |