From 27e24bda28e90dbd22fb20bd6545fddc4bb33d41 Mon Sep 17 00:00:00 2001 From: Eduardo Bart Date: Wed, 4 Apr 2012 10:16:33 -0300 Subject: [PATCH] fixes to compile on gcc 4.7 --- src/framework/const.h | 2 +- src/framework/luascript/luabinder.h | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/framework/const.h b/src/framework/const.h index 0d7f0953..1cabd0ea 100644 --- a/src/framework/const.h +++ b/src/framework/const.h @@ -28,7 +28,7 @@ #define DEG_TO_RAD (acos(-1)/180.0) #define RAD_TO_DEC (180.0/acos(-1)) -#define BUILD_COMPILER "gcc "__VERSION__ +#define BUILD_COMPILER "gcc " __VERSION__ #define BUILD_DATE __DATE__ #ifndef BUILD_REVISION diff --git a/src/framework/luascript/luabinder.h b/src/framework/luascript/luabinder.h index 16202800..f5cde9cf 100644 --- a/src/framework/luascript/luabinder.h +++ b/src/framework/luascript/luabinder.h @@ -104,6 +104,12 @@ namespace luabinder }; } + /// Bind a customized function + inline + LuaCppFunction bind_fun(const std::function& f) { + return f; + } + /// Bind a std::function template LuaCppFunction bind_fun(const std::function& f) { @@ -134,13 +140,6 @@ namespace luabinder return bind_lambda_fun::call(f); } - /// Bind a customized functions - template<> - inline - LuaCppFunction bind_fun(const std::function& f) { - return f; - } - /// Convert to C++ functions pointers to std::function then bind template LuaCppFunction bind_fun(Ret (*f)(Args...)) {