diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-09-27 22:27:39 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-09-27 22:27:39 +0300 |
commit | 4102bb248ed5f5efcd81d317a876318c91bad4d6 (patch) | |
tree | 738800bc14ade7397ff98f036e3bf5500715e63e | |
parent | beb426326518da97747cb5dce6773a13a96ceb2a (diff) | |
download | ManaVerse-4102bb248ed5f5efcd81d317a876318c91bad4d6.tar.gz ManaVerse-4102bb248ed5f5efcd81d317a876318c91bad4d6.tar.bz2 ManaVerse-4102bb248ed5f5efcd81d317a876318c91bad4d6.tar.xz ManaVerse-4102bb248ed5f5efcd81d317a876318c91bad4d6.zip |
fix code style and issues with different builds.
-rw-r--r-- | src/being/playerrelations.h | 1 | ||||
-rw-r--r-- | src/client.cpp | 6 | ||||
-rw-r--r-- | src/gui/sdlfont.cpp | 1 | ||||
-rw-r--r-- | src/gui/widgets/layout.h | 2 | ||||
-rw-r--r-- | src/gui/widgets/setupitem.cpp | 2 | ||||
-rw-r--r-- | src/render/graphics.h | 1 | ||||
-rw-r--r-- | src/resources/sdl2imagehelper.h | 3 | ||||
-rw-r--r-- | src/resources/sdl2softwareimagehelper.h | 3 | ||||
-rw-r--r-- | src/resources/sdlimagehelper.h | 3 | ||||
-rw-r--r-- | src/test/testlauncher.h | 4 | ||||
-rw-r--r-- | src/utils/sdlhelper.cpp | 1 | ||||
-rw-r--r-- | src/utils/stringutils_unittest.cc | 10 |
12 files changed, 21 insertions, 16 deletions
diff --git a/src/being/playerrelations.h b/src/being/playerrelations.h index c24363fcf..830991924 100644 --- a/src/being/playerrelations.h +++ b/src/being/playerrelations.h @@ -100,7 +100,6 @@ class PlayerIgnoreStrategy class PlayerRelationsListener { public: - virtual ~PlayerRelationsListener() { } diff --git a/src/client.cpp b/src/client.cpp index 2cbddf87f..bfba36e7c 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -2942,7 +2942,7 @@ void Client::logEvent(const SDL_Event &event) case SDL_FINGERDOWN: { const SDL_TouchFingerEvent &touch = event.tfinger; - logger->log("event: SDL_FINGERDOWN: %lld,%lld (%f,%f) (%f,%f)", + logger->log("event: SDL_FINGERDOWN: %ld,%ld (%f,%f) (%f,%f)", touch.touchId, touch.fingerId, touch.x, touch.y, touch.dx, touch.dy); break; @@ -2950,7 +2950,7 @@ void Client::logEvent(const SDL_Event &event) case SDL_FINGERUP: { const SDL_TouchFingerEvent &touch = event.tfinger; - logger->log("event: SDL_FINGERUP: %lld,%lld (%f,%f) (%f,%f)", + logger->log("event: SDL_FINGERUP: %ld,%ld (%f,%f) (%f,%f)", touch.touchId, touch.fingerId, touch.x, touch.y, touch.dx, touch.dy); break; @@ -2958,7 +2958,7 @@ void Client::logEvent(const SDL_Event &event) case SDL_FINGERMOTION: { const SDL_TouchFingerEvent &touch = event.tfinger; - logger->log("event: SDL_FINGERMOTION: %lld,%lld (%f,%f) (%f,%f)", + logger->log("event: SDL_FINGERMOTION: %ld,%ld (%f,%f) (%f,%f)", touch.touchId, touch.fingerId, touch.x, touch.y, touch.dx, touch.dy); break; diff --git a/src/gui/sdlfont.cpp b/src/gui/sdlfont.cpp index 749a36b4e..13749895a 100644 --- a/src/gui/sdlfont.cpp +++ b/src/gui/sdlfont.cpp @@ -31,7 +31,6 @@ #include "resources/image.h" #include "resources/imagehelper.h" -//#include "resources/resourcemanager.h" #include "resources/surfaceimagehelper.h" #include "utils/paths.h" diff --git a/src/gui/widgets/layout.h b/src/gui/widgets/layout.h index 1371420f7..8a33f03f6 100644 --- a/src/gui/widgets/layout.h +++ b/src/gui/widgets/layout.h @@ -173,7 +173,7 @@ class LayoutCell FILL }; - ~LayoutCell(); + virtual ~LayoutCell(); /** * Sets the padding around the cell content. diff --git a/src/gui/widgets/setupitem.cpp b/src/gui/widgets/setupitem.cpp index 417133ec6..652a1402b 100644 --- a/src/gui/widgets/setupitem.cpp +++ b/src/gui/widgets/setupitem.cpp @@ -513,7 +513,7 @@ void SetupItemLabel::createControls() { if (mIsSeparator) { - const std::string str (" \342\200\225\342\200\225\342\200\225" + const std::string str(" \342\200\225\342\200\225\342\200\225" "\342\200\225\342\200\225 "); mLabel = new Label(this, std::string(str).append(mText).append(str)); } diff --git a/src/render/graphics.h b/src/render/graphics.h index fa2416750..fd87e6733 100644 --- a/src/render/graphics.h +++ b/src/render/graphics.h @@ -97,7 +97,6 @@ class ImageRect final class Graphics : public gcn::Graphics { public: - A_DELETE_COPY(Graphics) /** diff --git a/src/resources/sdl2imagehelper.h b/src/resources/sdl2imagehelper.h index 43e6178e7..78800fda0 100644 --- a/src/resources/sdl2imagehelper.h +++ b/src/resources/sdl2imagehelper.h @@ -42,7 +42,8 @@ class SDLImageHelper final : public ImageHelper friend class Image; public: - SDLImageHelper() + SDLImageHelper() : + ImageHelper() { } A_DELETE_COPY(SDLImageHelper) diff --git a/src/resources/sdl2softwareimagehelper.h b/src/resources/sdl2softwareimagehelper.h index f4160b2cd..aba8e020c 100644 --- a/src/resources/sdl2softwareimagehelper.h +++ b/src/resources/sdl2softwareimagehelper.h @@ -42,7 +42,8 @@ class SDL2SoftwareImageHelper final : public ImageHelper friend class Image; public: - SDL2SoftwareImageHelper() + SDL2SoftwareImageHelper() : + ImageHelper() { } A_DELETE_COPY(SDL2SoftwareImageHelper) diff --git a/src/resources/sdlimagehelper.h b/src/resources/sdlimagehelper.h index 7253e9090..c73287edf 100644 --- a/src/resources/sdlimagehelper.h +++ b/src/resources/sdlimagehelper.h @@ -43,7 +43,8 @@ class SDLImageHelper final : public ImageHelper friend class Image; public: - SDLImageHelper() + SDLImageHelper() : + ImageHelper() { } A_DELETE_COPY(SDLImageHelper) diff --git a/src/test/testlauncher.h b/src/test/testlauncher.h index 76e1c68da..17c3c0f2c 100644 --- a/src/test/testlauncher.h +++ b/src/test/testlauncher.h @@ -28,6 +28,10 @@ #include <fstream> #include <string> +#ifdef WIN32 +#include <sys/time.h> +#endif + #include "localconsts.h" class TestLauncher final diff --git a/src/utils/sdlhelper.cpp b/src/utils/sdlhelper.cpp index da81f03ea..1511bedb1 100644 --- a/src/utils/sdlhelper.cpp +++ b/src/utils/sdlhelper.cpp @@ -43,6 +43,7 @@ bool SDL::getAllVideoModes(StringVect &modeList) .append(toString(static_cast<int>(modes[0]->h))); logger->log("support mode: " + modeString); modeList.push_back(modeString); + return true; #else /* Check which modes are available */ if (modes == static_cast<SDL_Rect **>(nullptr)) diff --git a/src/utils/stringutils_unittest.cc b/src/utils/stringutils_unittest.cc index 06ddaefd4..a3ae69d48 100644 --- a/src/utils/stringutils_unittest.cc +++ b/src/utils/stringutils_unittest.cc @@ -133,23 +133,23 @@ TEST(stringuntils, compareStrI1) { std::string str1 = ""; std::string str2 = ""; - EXPECT_TRUE(compareStrI(str1, str2) == 0); + EXPECT_EQ(0, compareStrI(str1, str2)); str1 = "test"; str2 = "test"; - EXPECT_TRUE(compareStrI(str1, str2) == 0); + EXPECT_EQ(0, compareStrI(str1, str2)); str1 = "test"; str2 = "test1"; - EXPECT_TRUE(compareStrI(str1, str2) < 0); + EXPECT_GT(0, compareStrI(str1, str2)); str1 = "test"; str2 = "aest1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; - EXPECT_TRUE(compareStrI(str1, str2) > 0); + EXPECT_LT(0, compareStrI(str1, str2)); str1 = "testaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; str2 = "testaa"; - EXPECT_TRUE(compareStrI(str1, str2) > 0); + EXPECT_LT(0, compareStrI(str1, str2)); } TEST(stringuntils, isWordSeparator1) |