diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-07 01:53:51 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-07 01:53:51 +0300 |
commit | 2492b561385859b7ef76fe816a8dc845f0b9bd09 (patch) | |
tree | 62633f8cd7c027c2a8e1bae61264a79394aeb751 /src/gui/widgets/window.cpp | |
parent | ce14a018a6f66aa1309ebe71a8217082d83cd0da (diff) | |
download | manaverse-2492b561385859b7ef76fe816a8dc845f0b9bd09.tar.gz manaverse-2492b561385859b7ef76fe816a8dc845f0b9bd09.tar.bz2 manaverse-2492b561385859b7ef76fe816a8dc845f0b9bd09.tar.xz manaverse-2492b561385859b7ef76fe816a8dc845f0b9bd09.zip |
Fix some casts between signed and unsigned in some files.
Diffstat (limited to 'src/gui/widgets/window.cpp')
-rw-r--r-- | src/gui/widgets/window.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index e22ea3f60..02a13a249 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -202,7 +202,8 @@ Window::Window(const std::string &caption, { mCaptionAlign = Graphics::LEFT; } - setTitleBarHeight(getOption("titlebarHeight")); + setTitleBarHeight(static_cast<unsigned int>( + getOption("titlebarHeight"))); if (!mTitleBarHeight) mTitleBarHeight = mCaptionFont->getHeight() + mPadding; @@ -1287,8 +1288,10 @@ int Window::getResizeHandles(const MouseEvent &event) if (!mStickyButtonLock || !mSticky) { - if (mGrip && (y > mTitleBarHeight || (y < mPadding - && mTitleBarHeight > mPadding))) + if (mGrip && + (y > mTitleBarHeight || + (static_cast<int>(y) < mPadding && + static_cast<int>(mTitleBarHeight) > mPadding))) { if (!getWindowArea().isPointInRect(x, y) && event.getSource() == this) @@ -1315,8 +1318,9 @@ bool Window::isResizeAllowed(const MouseEvent &event) const { const int y = event.getY(); - if (mGrip && (y > static_cast<int>(mTitleBarHeight) - || y < static_cast<int>(mPadding))) + if (mGrip && + (y > static_cast<int>(mTitleBarHeight) || + y < mPadding)) { const int x = event.getX(); |