From 63a4dafce5567a8d5324f68869756fb5180f1980 Mon Sep 17 00:00:00 2001 From: ThePhD Date: Thu, 24 Apr 2014 15:04:02 -0400 Subject: [PATCH] Better names for the functors in preparation for working with whole classes of them. This is going to be tough... --- sol/lua_function.hpp | 12 ++++++------ sol/table.hpp | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sol/lua_function.hpp b/sol/lua_function.hpp index ba3df646..f2ddae0b 100644 --- a/sol/lua_function.hpp +++ b/sol/lua_function.hpp @@ -172,13 +172,13 @@ struct lua_func { }; template -struct lambda_lua_func : public lua_func { +struct functor_lua_func : public lua_func { typedef decltype(&TFx::operator()) fx_t; typedef function_traits fx_traits; TFx fx; template - lambda_lua_func(FxArgs&&... fxargs): fx(std::forward(fxargs)...) {} + functor_lua_func(FxArgs&&... fxargs): fx(std::forward(fxargs)...) {} virtual int operator()(lua_State* L) override { return (*this)(tuple_types(), typename fx_traits::args_type(), L); @@ -205,13 +205,13 @@ struct lambda_lua_func : public lua_func { }; template::value> -struct explicit_lua_func : public lua_func { +struct function_lua_func : public lua_func { typedef typename std::remove_pointer::type>::type fx_t; typedef function_traits fx_traits; TFx fx; template - explicit_lua_func(FxArgs&&... fxargs): fx(std::forward(fxargs)...) {} + function_lua_func(FxArgs&&... fxargs): fx(std::forward(fxargs)...) {} template int operator()(types, types t, lua_State* L) { @@ -238,7 +238,7 @@ struct explicit_lua_func : public lua_func { }; template -struct explicit_lua_func : public lua_func { +struct function_lua_func : public lua_func { typedef typename std::remove_pointer::type>::type fx_t; typedef function_traits fx_traits; struct lambda { @@ -255,7 +255,7 @@ struct explicit_lua_func : public lua_func { } fx; template - explicit_lua_func(T m, FxArgs&&... fxargs): fx(std::move(m), std::forward(fxargs)...) {} + function_lua_func(T m, FxArgs&&... fxargs): fx(std::move(m), std::forward(fxargs)...) {} template int operator()(types, types t, lua_State* L) { diff --git a/sol/table.hpp b/sol/table.hpp index 39d18914..1688a58e 100644 --- a/sol/table.hpp +++ b/sol/table.hpp @@ -153,7 +153,7 @@ private: template table& set_isconvertible_fx(std::false_type, T&& key, TFx&& fx) { typedef typename std::remove_pointer>::type clean_fx; - std::unique_ptr sptr(new lambda_lua_func(std::forward(fx))); + std::unique_ptr sptr(new functor_lua_func(std::forward(fx))); return set_fx(std::forward(key), std::move(sptr)); } @@ -165,7 +165,7 @@ private: template table& set_lvalue_fx(std::false_type, T&& key, TFx&& fx, TObj&& obj) { typedef typename std::remove_pointer>::type clean_fx; - std::unique_ptr sptr(new explicit_lua_func(std::forward(obj), std::forward(fx))); + std::unique_ptr sptr(new function_lua_func(std::forward(obj), std::forward(fx))); return set_fx(std::forward(key), std::move(sptr)); }