From f706f0e17ac2e7893feddc96b496db89f35e94a8 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 10 Nov 2021 19:49:15 +0800 Subject: *misc --- Runtime/Lua/LuaBind/LuaBindInvoker.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'Runtime/Lua/LuaBind/LuaBindInvoker.h') diff --git a/Runtime/Lua/LuaBind/LuaBindInvoker.h b/Runtime/Lua/LuaBind/LuaBindInvoker.h index edb0725..45a4e63 100644 --- a/Runtime/Lua/LuaBind/LuaBindInvoker.h +++ b/Runtime/Lua/LuaBind/LuaBindInvoker.h @@ -11,13 +11,9 @@ namespace LuaBind // 调用全局lua方法 struct GlobalInvoker { - GlobalInvoker(lua_State* st) - : state(st) - { - argc = 0; - } - UniversalRef method; + UniversalRef method; + GlobalInvoker(lua_State* st) : state(st), argc(0) {} void AddInt(int n); void AddFloat(float n); void AddNil(); @@ -30,9 +26,9 @@ namespace LuaBind ++argc; } - void Invoke(int nReturns); + virtual void Invoke(int nReturns); - private: + protected: State state; int argc; }; -- cgit v1.1-26-g67d0