From 17eb4c92bdaf20f66ef576028c67c80fcea93913 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 7 Feb 2016 22:51:42 +0300 Subject: Fix code style. --- src/gui/widgets/browserbox.cpp | 4 ++-- src/gui/widgets/browserbox_unittest.cc | 2 -- src/gui/widgets/itemlinkhandler.cpp | 2 -- src/gui/widgets/tabs/setup_video.cpp | 2 -- 4 files changed, 2 insertions(+), 8 deletions(-) (limited to 'src/gui/widgets') diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index eec2547ee..52ba88a7b 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -390,7 +390,7 @@ void BrowserBox::addRow(const std::string &row, const bool atTop) // Wraping between words (at blank spaces) if (nextChar < sz && tempRow.at(nextChar) == ' ') { - unsigned int nextSpacePos = CAST_U32( + int nextSpacePos = CAST_U32( tempRow.find(" ", (nextChar + 1))); if (nextSpacePos <= 0) nextSpacePos = CAST_U32(sz) - 1U; @@ -398,7 +398,7 @@ void BrowserBox::addRow(const std::string &row, const bool atTop) const unsigned int nextWordWidth = CAST_U32(font->getWidth( tempRow.substr(nextChar, - (nextSpacePos - nextChar)))); + (CAST_U32(nextSpacePos) - nextChar)))); if ((x + nextWordWidth + 10) > CAST_U32(getWidth())) diff --git a/src/gui/widgets/browserbox_unittest.cc b/src/gui/widgets/browserbox_unittest.cc index f73bb9ccb..9fe75dda5 100644 --- a/src/gui/widgets/browserbox_unittest.cc +++ b/src/gui/widgets/browserbox_unittest.cc @@ -18,8 +18,6 @@ * along with this program. If not, see . */ -#include "logger.h" - #include "catch.hpp" #include "client.h" diff --git a/src/gui/widgets/itemlinkhandler.cpp b/src/gui/widgets/itemlinkhandler.cpp index e363fe671..ee2534546 100644 --- a/src/gui/widgets/itemlinkhandler.cpp +++ b/src/gui/widgets/itemlinkhandler.cpp @@ -24,8 +24,6 @@ #include "itemcolormanager.h" -#include "const/resources/item/cards.h" - #include "gui/viewport.h" #include "gui/popups/itempopup.h" diff --git a/src/gui/widgets/tabs/setup_video.cpp b/src/gui/widgets/tabs/setup_video.cpp index 591093bc8..298205fca 100644 --- a/src/gui/widgets/tabs/setup_video.cpp +++ b/src/gui/widgets/tabs/setup_video.cpp @@ -22,8 +22,6 @@ #include "gui/widgets/tabs/setup_video.h" -#include "configuration.h" - #include "gui/windowmanager.h" #include "gui/windows/okdialog.h" -- cgit v1.2.3-60-g2f50