From 48896f81dd8f9cb23daf4921b991a24560cdb29e Mon Sep 17 00:00:00 2001 From: Henrique Santiago Date: Wed, 13 Apr 2011 22:10:25 -0300 Subject: [PATCH 1/2] undef ascii, protocol code commented, must swap lambda --- src/framework/net/protocol.cpp | 4 ++-- src/framework/prerequisites.h | 2 ++ src/framework/util/logger.cpp | 1 + src/framework/util/util.cpp | 1 + 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/framework/net/protocol.cpp b/src/framework/net/protocol.cpp index dbf5aefe..bc1c3f94 100644 --- a/src/framework/net/protocol.cpp +++ b/src/framework/net/protocol.cpp @@ -27,11 +27,11 @@ Protocol::Protocol() { m_connection = g_connections.createConnection(); - m_connection->setErrorCallback( + /*m_connection->setErrorCallback( [this](const boost::system::error_code& error, const std::string& msg){ this->onError(error, msg); } - ); + );*/ } void Protocol::send(NetworkMessagePtr networkMessage, Connection::ConnectionCallback onSend) diff --git a/src/framework/prerequisites.h b/src/framework/prerequisites.h index f69fff0f..56599edd 100644 --- a/src/framework/prerequisites.h +++ b/src/framework/prerequisites.h @@ -39,6 +39,8 @@ typedef int32_t int32; typedef int16_t int16; typedef int8_t int8; +#undef __STRICT_ANSI__ + // C headers #include #include diff --git a/src/framework/util/logger.cpp b/src/framework/util/logger.cpp index 9a57a354..fa49b856 100644 --- a/src/framework/util/logger.cpp +++ b/src/framework/util/logger.cpp @@ -21,6 +21,7 @@ * THE SOFTWARE. */ +#undef __STRICT_ANSI__ #include "logger.h" #include "util.h" diff --git a/src/framework/util/util.cpp b/src/framework/util/util.cpp index 9f08f9fd..4ffdd038 100644 --- a/src/framework/util/util.cpp +++ b/src/framework/util/util.cpp @@ -21,6 +21,7 @@ * THE SOFTWARE. */ +#undef __STRICT_ANSI__ #include "util.h" #include From 223e6ca85a51ac01c24a4c31791169e5c5e6b91d Mon Sep 17 00:00:00 2001 From: Henrique Santiago Date: Wed, 13 Apr 2011 22:30:41 -0300 Subject: [PATCH 2/2] remove undef, add on cmakelists --- CMakeLists.txt | 2 +- src/framework/prerequisites.h | 2 -- src/framework/util/logger.cpp | 2 -- src/framework/util/util.cpp | 2 -- 4 files changed, 1 insertion(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c6b8a764..c4f1fa78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ MESSAGE(STATUS "BUILD TYPE: " ${CMAKE_BUILD_TYPE}) # setup compiler options IF(CMAKE_COMPILER_IS_GNUCXX) - SET(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror -Wno-unused-parameter -std=c++0x") + SET(CMAKE_CXX_FLAGS "-Wall -Wextra -Werror -Wno-unused-parameter -std=gnu++0x") SET(CMAKE_CXX_FLAGS_DEBUG "-O1 -g -ggdb -fno-inline") SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -Wl,-s") SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") diff --git a/src/framework/prerequisites.h b/src/framework/prerequisites.h index 56599edd..f69fff0f 100644 --- a/src/framework/prerequisites.h +++ b/src/framework/prerequisites.h @@ -39,8 +39,6 @@ typedef int32_t int32; typedef int16_t int16; typedef int8_t int8; -#undef __STRICT_ANSI__ - // C headers #include #include diff --git a/src/framework/util/logger.cpp b/src/framework/util/logger.cpp index fa49b856..57b07953 100644 --- a/src/framework/util/logger.cpp +++ b/src/framework/util/logger.cpp @@ -21,8 +21,6 @@ * THE SOFTWARE. */ -#undef __STRICT_ANSI__ - #include "logger.h" #include "util.h" diff --git a/src/framework/util/util.cpp b/src/framework/util/util.cpp index 4ffdd038..e1ffd224 100644 --- a/src/framework/util/util.cpp +++ b/src/framework/util/util.cpp @@ -21,8 +21,6 @@ * THE SOFTWARE. */ -#undef __STRICT_ANSI__ - #include "util.h" #include