summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-07 22:51:42 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-07 22:51:42 +0300
commit17eb4c92bdaf20f66ef576028c67c80fcea93913 (patch)
tree4936eef82e62e6cd3107b2c99a9821b48902a59f /src
parent9fe21fcd8883b37bdc30224822e6e42afb35b8f0 (diff)
downloadmanaplus-17eb4c92bdaf20f66ef576028c67c80fcea93913.tar.gz
manaplus-17eb4c92bdaf20f66ef576028c67c80fcea93913.tar.bz2
manaplus-17eb4c92bdaf20f66ef576028c67c80fcea93913.tar.xz
manaplus-17eb4c92bdaf20f66ef576028c67c80fcea93913.zip
Fix code style.
Diffstat (limited to 'src')
-rw-r--r--src/enums/enums_unittest.cc2
-rw-r--r--src/gui/widgets/browserbox.cpp4
-rw-r--r--src/gui/widgets/browserbox_unittest.cc2
-rw-r--r--src/gui/widgets/itemlinkhandler.cpp2
-rw-r--r--src/gui/widgets/tabs/setup_video.cpp2
-rw-r--r--src/gui/windows/cutinwindow.cpp1
-rw-r--r--src/net/eathena/npcrecv.cpp2
-rw-r--r--src/render/graphics.cpp3
-rw-r--r--src/resources/db/colordb.cpp2
-rw-r--r--src/resources/db/palettedb.cpp2
-rw-r--r--src/resources/resourcemanager.cpp3
-rw-r--r--src/utils/cpu.cpp2
12 files changed, 8 insertions, 19 deletions
diff --git a/src/enums/enums_unittest.cc b/src/enums/enums_unittest.cc
index b1052908d..245bf98f8 100644
--- a/src/enums/enums_unittest.cc
+++ b/src/enums/enums_unittest.cc
@@ -22,8 +22,6 @@
#include "enums/being/gender.h"
-#include "enums/input/inputaction.h"
-
#include "debug.h"
TEST_CASE("Gender", "Enums")
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 <http://www.gnu.org/licenses/>.
*/
-#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"
diff --git a/src/gui/windows/cutinwindow.cpp b/src/gui/windows/cutinwindow.cpp
index 1a38661b8..571030407 100644
--- a/src/gui/windows/cutinwindow.cpp
+++ b/src/gui/windows/cutinwindow.cpp
@@ -100,7 +100,6 @@ void CutInWindow::show(const std::string &name,
const int height = mImage->getHeight() + mTitleBarHeight
+ mPadding;
- logger->log("detected sizes: %d, %d", mImage->getWidth(), mImage->getHeight());
const int screenWidth = mainGraphics->mWidth;
const int screenHeight = mainGraphics->mHeight;
diff --git a/src/net/eathena/npcrecv.cpp b/src/net/eathena/npcrecv.cpp
index 4088e8c4e..91c05ccd5 100644
--- a/src/net/eathena/npcrecv.cpp
+++ b/src/net/eathena/npcrecv.cpp
@@ -24,8 +24,6 @@
#include "being/being.h"
-#include "enums/cutin.h"
-
#include "gui/windows/cutinwindow.h"
#include "gui/windows/npcdialog.h"
diff --git a/src/render/graphics.cpp b/src/render/graphics.cpp
index d01813fb3..383ce96fd 100644
--- a/src/render/graphics.cpp
+++ b/src/render/graphics.cpp
@@ -74,7 +74,6 @@
#include "render/openglx/mglxinit.h"
#endif
-#include "resources/imagehelper.h"
#ifdef USE_OPENGL
#include "resources/openglimagehelper.h"
#ifndef ANDROID
@@ -84,6 +83,8 @@
#include "render/nacl/naclfunctions.h"
#include "render/nacl/naclgles.h"
#endif // __native_client__
+#else // USE_OPENGL
+#include "resources/imagehelper.h"
#endif // USE_OPENGL
#ifdef USE_OPENGL
diff --git a/src/resources/db/colordb.cpp b/src/resources/db/colordb.cpp
index 07dd7b46e..5345010b3 100644
--- a/src/resources/db/colordb.cpp
+++ b/src/resources/db/colordb.cpp
@@ -26,8 +26,6 @@
#include "resources/beingcommon.h"
-#include "utils/files.h"
-
#include "debug.h"
namespace
diff --git a/src/resources/db/palettedb.cpp b/src/resources/db/palettedb.cpp
index 3ad2b13fa..a3c1fe4a4 100644
--- a/src/resources/db/palettedb.cpp
+++ b/src/resources/db/palettedb.cpp
@@ -27,8 +27,6 @@
#include "resources/dye/dyecolor.h"
-#include <map>
-
#include "debug.h"
namespace
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index 34a4d523d..366460a6b 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -31,8 +31,9 @@
#ifdef USE_OPENGL
#include "resources/atlas/atlasmanager.h"
#include "resources/atlas/atlasresource.h"
-#endif
+#else // USE_OPENGL
#include "resources/image.h"
+#endif // USE_OPENGL
#include "resources/imagehelper.h"
#include "resources/imageset.h"
#include "resources/sdlmusic.h"
diff --git a/src/utils/cpu.cpp b/src/utils/cpu.cpp
index 047ae97da..5fb0195a6 100644
--- a/src/utils/cpu.cpp
+++ b/src/utils/cpu.cpp
@@ -22,7 +22,9 @@
#include "logger.h"
+#if defined(__linux__) || defined(__linux)
#include "utils/stringutils.h"
+#endif
#include "debug.h"