diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-09-19 20:59:49 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-09-19 20:59:49 +0300 |
commit | 378441b559615cc96150e64137ae2ce02d23d2f2 (patch) | |
tree | 10ceb5467000747f3b1d6f41c96ca5a595f57d4f /src | |
parent | 11209f8ab3bfc738f0249e0cdfe6400f73cb0b85 (diff) | |
download | plus-378441b559615cc96150e64137ae2ce02d23d2f2.tar.gz plus-378441b559615cc96150e64137ae2ce02d23d2f2.tar.bz2 plus-378441b559615cc96150e64137ae2ce02d23d2f2.tar.xz plus-378441b559615cc96150e64137ae2ce02d23d2f2.zip |
fix some compilation issues in different platforms.
Diffstat (limited to 'src')
-rw-r--r-- | src/graphicsmanager.cpp | 2 | ||||
-rw-r--r-- | src/gui/setup_video.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/setuptouchitem.cpp | 2 | ||||
-rw-r--r-- | src/guild.cpp | 2 | ||||
-rw-r--r-- | src/maplayer.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/messagehandler.h | 2 | ||||
-rw-r--r-- | src/party.cpp | 2 | ||||
-rw-r--r-- | src/resources/sdlmusic.cpp | 3 | ||||
-rw-r--r-- | src/resources/sdlmusic.h | 2 | ||||
-rw-r--r-- | src/resources/spritedef.cpp | 2 | ||||
-rw-r--r-- | src/utils/process.cpp | 2 | ||||
-rw-r--r-- | src/utils/stringutils.cpp | 4 |
12 files changed, 14 insertions, 13 deletions
diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index 423b08202..d226e35e0 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -150,7 +150,9 @@ int GraphicsManager::detectGraphics() logger->log1("enable opengl mode"); int textureSampler = 0; int compressTextures = 0; +#ifndef ANDROID mainGraphics = new NormalOpenGLGraphics; +#endif SDL_Window *const window = createWindow(100, 100, 0, SDL_ANYFORMAT | SDL_OPENGL); mainGraphics->setWindow(window, 100, 100); diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp index b82b25f25..4c285a879 100644 --- a/src/gui/setup_video.cpp +++ b/src/gui/setup_video.cpp @@ -565,7 +565,7 @@ void Setup_Video::action(const gcn::ActionEvent &event) { const int val = test->getConfig().getValueInt("opengl", -1); if (val >= 0 && static_cast<unsigned int>(val) - < sizeof(renderToIndex) / sizeof (int)) + < sizeof(renderToIndex) / sizeof(int)) { mOpenGLDropDown->setSelected(renderToIndex[val]); } diff --git a/src/gui/widgets/setuptouchitem.cpp b/src/gui/widgets/setuptouchitem.cpp index b62e1e550..d8d6eda9a 100644 --- a/src/gui/widgets/setuptouchitem.cpp +++ b/src/gui/widgets/setuptouchitem.cpp @@ -31,7 +31,7 @@ #include "debug.h" -static const class SortTouchActionFunctor final +static class SortTouchActionFunctor final { public: bool operator() (const SetupActionData *const data1, diff --git a/src/guild.cpp b/src/guild.cpp index 3b80022ae..12fbe78a4 100644 --- a/src/guild.cpp +++ b/src/guild.cpp @@ -28,7 +28,7 @@ #include "debug.h" -static const class SortGuildFunctor final +static class SortGuildFunctor final { public: bool operator() (const GuildMember *const m1, diff --git a/src/maplayer.h b/src/maplayer.h index 410be05fa..62c6e86b7 100644 --- a/src/maplayer.h +++ b/src/maplayer.h @@ -89,7 +89,7 @@ class MapLayer final: public ConfigListener public: enum Type { - TILES, + TILES = 0, COLLISION, HEIGHTS }; diff --git a/src/net/tmwa/messagehandler.h b/src/net/tmwa/messagehandler.h index e012f7a8a..4cdc46119 100644 --- a/src/net/tmwa/messagehandler.h +++ b/src/net/tmwa/messagehandler.h @@ -25,8 +25,6 @@ #include "net/messagehandler.h" -//#include <SDL_types.h> - #include <memory> namespace TmwAthena diff --git a/src/party.cpp b/src/party.cpp index 2f747e752..b6594672a 100644 --- a/src/party.cpp +++ b/src/party.cpp @@ -27,7 +27,7 @@ #include "debug.h" -static const class SortPartyFunctor final +static class SortPartyFunctor final { public: bool operator() (const PartyMember *const p1, diff --git a/src/resources/sdlmusic.cpp b/src/resources/sdlmusic.cpp index 03c6922d6..b9f6492d1 100644 --- a/src/resources/sdlmusic.cpp +++ b/src/resources/sdlmusic.cpp @@ -51,13 +51,14 @@ Resource *SDLMusic::load(SDL_RWops *const rw) if (Mix_Music *const music = Mix_LoadMUSType_RW(rw, MUS_OGG, 1)) { return new SDLMusic(music, nullptr); + } #else // Mix_LoadMUSType_RW was added without version changed in SDL1.2 :( if (Mix_Music *const music = Mix_LoadMUS_RW(rw)) { return new SDLMusic(music, rw); -#endif } +#endif else { logger->log("Error, failed to load music: %s", Mix_GetError()); diff --git a/src/resources/sdlmusic.h b/src/resources/sdlmusic.h index 23397ec61..04b78bde9 100644 --- a/src/resources/sdlmusic.h +++ b/src/resources/sdlmusic.h @@ -29,8 +29,6 @@ #include "localconsts.h" -//struct SDL_RWops; - /** * Defines a class for loading and storing music. */ diff --git a/src/resources/spritedef.cpp b/src/resources/spritedef.cpp index 2d5d25fb4..a855e90ba 100644 --- a/src/resources/spritedef.cpp +++ b/src/resources/spritedef.cpp @@ -237,7 +237,7 @@ void SpriteDef::loadAction(const XmlNodePtr node, const int variant_offset) imageSetName.c_str(), getIdPath().c_str()); return; } - ImageSet *const imageSet = si->second; + const ImageSet *const imageSet = si->second; if (actionName == SpriteAction::INVALID) { diff --git a/src/utils/process.cpp b/src/utils/process.cpp index 37670b18b..1859b1c2f 100644 --- a/src/utils/process.cpp +++ b/src/utils/process.cpp @@ -34,6 +34,7 @@ const int timeOut = 10; #ifdef WIN32 +#include "utils/stringutils.h" #include <windows.h> int execFileWait(const std::string &pathName, const std::string &name A_UNUSED, @@ -236,6 +237,7 @@ bool openBrowser(std::string url) nullptr, nullptr, SW_SHOWNORMAL)) > 32; } #elif defined ANDROID +#include "utils/stringutils.h" #include <SDL_screenkeyboard.h> bool openBrowser(std::string url) { diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp index c5ac71d28..680d8e44d 100644 --- a/src/utils/stringutils.cpp +++ b/src/utils/stringutils.cpp @@ -26,9 +26,9 @@ #include <algorithm> #include <cstdarg> #include <cstdio> -#include <list> - #include <ctype.h> +#include <list> +#include <time.h> #include "debug.h" |