diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-01-30 20:33:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-01-30 20:33:23 +0300 |
commit | 5015c59af9d28b3a3bbedfd54b3827dd96597efa (patch) | |
tree | b9535924f378ce192c5ab150a3c9738213abbc80 | |
parent | d4d588a10e37bcd0f8653e697952f21602b8d0e9 (diff) | |
download | plus-5015c59af9d28b3a3bbedfd54b3827dd96597efa.tar.gz plus-5015c59af9d28b3a3bbedfd54b3827dd96597efa.tar.bz2 plus-5015c59af9d28b3a3bbedfd54b3827dd96597efa.tar.xz plus-5015c59af9d28b3a3bbedfd54b3827dd96597efa.zip |
Fix code style.
-rw-r--r-- | src/commands.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/equipmentwindow.cpp | 2 | ||||
-rw-r--r-- | src/localconsts.h | 2 | ||||
-rw-r--r-- | src/net/download.cpp | 12 | ||||
-rw-r--r-- | src/net/sdltcpnet.cpp | 4 | ||||
-rw-r--r-- | src/render/graphics.cpp | 4 |
6 files changed, 15 insertions, 11 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index c0f719054..04cd84166 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -1280,6 +1280,8 @@ struct UploadChatInfo addStr() { } + A_DELETE_COPY(UploadChatInfo) + ChatTab *tab; Net::Download *upload; std::string text; diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp index cd04aaf99..621f5e537 100644 --- a/src/gui/windows/equipmentwindow.cpp +++ b/src/gui/windows/equipmentwindow.cpp @@ -48,8 +48,6 @@ #include <guichan/font.hpp> -#include <SDL_mouse.h> - #include "debug.h" static const int BOX_COUNT = 13; diff --git a/src/localconsts.h b/src/localconsts.h index cf6194c9e..58b469f01 100644 --- a/src/localconsts.h +++ b/src/localconsts.h @@ -33,10 +33,12 @@ #endif #endif +#ifndef DEBUGBUILD #ifndef USE_INTERNALGUICHAN #warning using depricated way for linking with guichan. \ Please removed configure flag --without-internalguichan #endif +#endif #if !defined(__GXX_EXPERIMENTAL_CXX0X__) #undef nullptr diff --git a/src/net/download.cpp b/src/net/download.cpp index 2abffba0c..d0c6515fc 100644 --- a/src/net/download.cpp +++ b/src/net/download.cpp @@ -541,14 +541,12 @@ void Download::prepareForm(curl_httppost **form, const std::string &fileName) curl_httppost *lastPtr = nullptr; std::ifstream file; - std::ostringstream str; - char *line = new char[10001]; - file.open(fileName.c_str(), std::ios::in); - if (!file.is_open()) return; + char *line = new char[10001]; + std::ostringstream str; while (file.getline(line, 10000)) str << line << "\n"; @@ -560,8 +558,10 @@ void Download::prepareForm(curl_httppost **form, const std::string &fileName) CURLFORM_END); } -size_t Download::writeFunction(void *ptr, size_t size, - size_t nmemb, void *stream) +size_t Download::writeFunction(void *ptr, + size_t size, + size_t nmemb, + void *stream A_UNUSED) { const size_t totalMem = size * nmemb; char *buf = new char[totalMem + 1]; diff --git a/src/net/sdltcpnet.cpp b/src/net/sdltcpnet.cpp index 7530e0f53..103620a5b 100644 --- a/src/net/sdltcpnet.cpp +++ b/src/net/sdltcpnet.cpp @@ -89,7 +89,9 @@ int TcpNet::resolveHost(IPaddress *const address, const char *const host, TcpNet::Socket TcpNet::open(IPaddress *const ip) { const TcpNet::Socket sock = SDLNet_TCP_Open(ip); -#ifndef __native_client__ +#if !defined(__native_client__) \ + || defined(TCP_THIN_LINEAR_TIMEOUTS) \ + || defined(TCP_THIN_DUPACK) if (sock && ip) { const TCPsocketHack *const hack diff --git a/src/render/graphics.cpp b/src/render/graphics.cpp index c6237cf97..6ad1c67d7 100644 --- a/src/render/graphics.cpp +++ b/src/render/graphics.cpp @@ -407,8 +407,8 @@ bool Graphics::setFullscreen(const bool fs) if (mFullscreen == fs) return true; - return setVideoMode(mActualWidth, mActualHeight, mScale, mBpp, fs, mHWAccel, - mEnableResize, mNoFrame); + return setVideoMode(mActualWidth, mActualHeight, mScale, mBpp, fs, + mHWAccel, mEnableResize, mNoFrame); } bool Graphics::resizeScreen(const int width, const int height) |