mirror of
https://github.com/edubart/otclient.git
synced 2025-05-01 01:59:21 +02:00
fixes to compile on gcc 4.7
This commit is contained in:
parent
11ad1f5c5b
commit
27e24bda28
@ -104,6 +104,12 @@ namespace luabinder
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Bind a customized function
|
||||||
|
inline
|
||||||
|
LuaCppFunction bind_fun(const std::function<int(LuaInterface*)>& f) {
|
||||||
|
return f;
|
||||||
|
}
|
||||||
|
|
||||||
/// Bind a std::function
|
/// Bind a std::function
|
||||||
template<typename Ret, typename... Args>
|
template<typename Ret, typename... Args>
|
||||||
LuaCppFunction bind_fun(const std::function<Ret(Args...)>& f) {
|
LuaCppFunction bind_fun(const std::function<Ret(Args...)>& f) {
|
||||||
@ -134,13 +140,6 @@ namespace luabinder
|
|||||||
return bind_lambda_fun<F>::call(f);
|
return bind_lambda_fun<F>::call(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Bind a customized functions
|
|
||||||
template<>
|
|
||||||
inline
|
|
||||||
LuaCppFunction bind_fun(const std::function<int(LuaInterface*)>& f) {
|
|
||||||
return f;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Convert to C++ functions pointers to std::function then bind
|
/// Convert to C++ functions pointers to std::function then bind
|
||||||
template<typename Ret, typename... Args>
|
template<typename Ret, typename... Args>
|
||||||
LuaCppFunction bind_fun(Ret (*f)(Args...)) {
|
LuaCppFunction bind_fun(Ret (*f)(Args...)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user