diff --git a/include/Nazara/Lua/LuaInstance.hpp b/include/Nazara/Lua/LuaInstance.hpp index 1124ce72a..3a725472a 100644 --- a/include/Nazara/Lua/LuaInstance.hpp +++ b/include/Nazara/Lua/LuaInstance.hpp @@ -133,8 +133,8 @@ namespace Nz void Remove(int index); void Replace(int index); - void SetField(const char* name, int index = -2); - void SetField(const String& name, int index = -2); + void SetField(const char* name, int tableIndex = -2); + void SetField(const String& name, int tableIndex = -2); void SetGlobal(const char* name); void SetGlobal(const String& name); void SetMetatable(const char* tname); diff --git a/include/Nazara/Lua/LuaInstance.inl b/include/Nazara/Lua/LuaInstance.inl index 0274bb0be..57da097bc 100644 --- a/include/Nazara/Lua/LuaInstance.inl +++ b/include/Nazara/Lua/LuaInstance.inl @@ -137,6 +137,12 @@ namespace Nz { } + template + void ProcessArgs() + { + // No argument to process + } + template void ProcessArgs() { @@ -168,7 +174,7 @@ namespace Nz } private: - std::tuple m_args; + std::tuple>...> m_args; LuaInstance& m_instance; }; @@ -185,6 +191,7 @@ namespace Nz template void ProcessArgs() { + // No argument to process } template @@ -232,7 +239,7 @@ namespace Nz } private: - std::tuple m_args; + std::tuple>...> m_args; LuaInstance& m_instance; T& m_object; }; diff --git a/src/Nazara/Lua/LuaInstance.cpp b/src/Nazara/Lua/LuaInstance.cpp index e1ed81644..dcaad2e26 100644 --- a/src/Nazara/Lua/LuaInstance.cpp +++ b/src/Nazara/Lua/LuaInstance.cpp @@ -714,14 +714,14 @@ namespace Nz lua_replace(m_state, index); } - void LuaInstance::SetField(const char* name, int index) + void LuaInstance::SetField(const char* name, int tableIndex) { - lua_setfield(m_state, index, name); + lua_setfield(m_state, tableIndex, name); } - void LuaInstance::SetField(const String& name, int index) + void LuaInstance::SetField(const String& name, int tableIndex) { - lua_setfield(m_state, index, name.GetConstBuffer()); + lua_setfield(m_state, tableIndex, name.GetConstBuffer()); } void LuaInstance::SetGlobal(const char* name)