From 5564df0ae67373da8ffb148fde95fdd9142c870b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 8 Nov 2013 14:52:18 +0300 Subject: fix code style. --- src/graphicsmanager.cpp | 10 +++++++--- src/gui/windows/editdialog.cpp | 2 -- src/net/netconsts.h | 7 ++++--- src/utils/files.cpp | 6 +++--- src/utils/xml.cpp | 2 +- 5 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index c6c36d15d..ace00663e 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -365,9 +365,13 @@ void GraphicsManager::setVideoMode() int width = res[0]; int height = res[1]; #elif defined __native_client__ - const SDL_VideoInfo* info = SDL_GetVideoInfo(); - int width = info->current_w; - int height = info->current_h; +#ifdef USE_SDL2 + // not implimented +#else + const SDL_VideoInfo* info = SDL_GetVideoInfo(); + int width = info->current_w; + int height = info->current_h; +#endif #else int width = config.getIntValue("screenwidth"); int height = config.getIntValue("screenheight"); diff --git a/src/gui/windows/editdialog.cpp b/src/gui/windows/editdialog.cpp index 05f55ad67..a4711784e 100644 --- a/src/gui/windows/editdialog.cpp +++ b/src/gui/windows/editdialog.cpp @@ -26,8 +26,6 @@ #include "utils/gettext.h" -#include - #include "debug.h" EditDialog::EditDialog(const std::string &title, const std::string &msg, diff --git a/src/net/netconsts.h b/src/net/netconsts.h index 38f84ebaa..0af23b8a9 100644 --- a/src/net/netconsts.h +++ b/src/net/netconsts.h @@ -18,9 +18,10 @@ * along with this program. If not, see . */ -#ifndef NET_DEFAULTS_H -#define NET_DEFAULTS_H +#ifndef NET_NETCONSTS_H +#define NET_NETCONSTS_H +#include static const uint16_t DEFAULT_PORT = 6901; -#endif // NET_DEFAULTS_H +#endif // NET_NETCONSTS_H diff --git a/src/utils/files.cpp b/src/utils/files.cpp index bfaed472a..15b667ba8 100644 --- a/src/utils/files.cpp +++ b/src/utils/files.cpp @@ -20,12 +20,12 @@ #include "utils/files.h" -#include "logger.h" - +#if defined(ANDROID) || defined(__native_client__) #include "resources/resourcemanager.h" +#include "utils/physfstools.h" +#endif #include "utils/mkdir.h" -#include "utils/physfstools.h" #include "localconsts.h" diff --git a/src/utils/xml.cpp b/src/utils/xml.cpp index 60b4505c5..b87418079 100644 --- a/src/utils/xml.cpp +++ b/src/utils/xml.cpp @@ -44,7 +44,7 @@ static void xmlErrorLogger(void *ctx A_UNUSED, const char *msg A_UNUSED, ...) #endif ; -static void xmlErrorLogger(void *ctx A_UNUSED, const char *msg A_UNUSED, ...) +static void xmlErrorLogger(void *ctx A_UNUSED, const char *msg, ...) { unsigned size = 1024; const unsigned msgSize = strlen(msg); -- cgit v1.2.3-70-g09d2