summaryrefslogtreecommitdiff
path: root/src/gui/widgets/extendedlistbox.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/gui/widgets/extendedlistbox.cpp
parent4429cb14e9e187edef27aba692a4266733f79c17 (diff)
downloadmv-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/extendedlistbox.cpp')
-rw-r--r--src/gui/widgets/extendedlistbox.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/widgets/extendedlistbox.cpp b/src/gui/widgets/extendedlistbox.cpp
index 23daafb8e..fd9b4c660 100644
--- a/src/gui/widgets/extendedlistbox.cpp
+++ b/src/gui/widgets/extendedlistbox.cpp
@@ -59,7 +59,7 @@ void ExtendedListBox::draw(Graphics *graphics)
updateAlpha();
Font *const font = getFont();
- const int height = static_cast<int>(mRowHeight);
+ const int height = CAST_S32(mRowHeight);
const int pad2 = 2 + mPadding;
const int width = mDimension.width;
int textPos = (height - font->getHeight()) / 2 + mPadding;
@@ -89,7 +89,7 @@ void ExtendedListBox::draw(Graphics *graphics)
{
const size_t strSize = str.size();
size_t divPos = strSize / 2;
- if (divPos > 0 && static_cast<unsigned char>(
+ if (divPos > 0 && CAST_U8(
str[divPos - 1]) >= 0xc0)
{
divPos --;
@@ -130,7 +130,7 @@ void ExtendedListBox::draw(Graphics *graphics)
if (minY != -1)
{
- mHighlightColor.a = static_cast<unsigned int>(mAlpha * 255.0F);
+ mHighlightColor.a = CAST_U32(mAlpha * 255.0F);
graphics->setColor(mHighlightColor);
graphics->fillRectangle(Rect(mPadding, minY + mPadding,
width - pad2, maxY - minY + height));
@@ -233,7 +233,7 @@ int ExtendedListBox::getSelectionByMouse(const int y) const
if (mListItems.empty() && mSelectedItems.empty())
return ListBox::getSelectionByMouse(y);
- const int height = static_cast<int>(mRowHeight);
+ const int height = CAST_S32(mRowHeight);
const size_t itemsSz = mListItems.size();
for (size_t f = 0; f < itemsSz; f ++)
{