diff --git a/include/Nazara/Lua/LuaState.hpp b/include/Nazara/Lua/LuaState.hpp index 67640925a..47c6d07cf 100644 --- a/include/Nazara/Lua/LuaState.hpp +++ b/include/Nazara/Lua/LuaState.hpp @@ -141,7 +141,6 @@ namespace Nz template void PushFunction(R(*func)(Args...), DefArgs&&... defArgs) const; template void PushGlobal(const char* name, T&& arg); template void PushGlobal(const String& name, T&& arg); - template void PushInstance(const char* tname, const T& instance) const; template void PushInstance(const char* tname, T&& instance) const; template void PushInstance(const char* tname, Args&&... args) const; void PushInteger(long long value) const; diff --git a/include/Nazara/Lua/LuaState.inl b/include/Nazara/Lua/LuaState.inl index 62669d72b..7dcc4e36f 100644 --- a/include/Nazara/Lua/LuaState.inl +++ b/include/Nazara/Lua/LuaState.inl @@ -706,7 +706,7 @@ namespace Nz template void LuaState::PushField(const char* name, T&& arg, int tableIndex) const { - Push(std::forward(arg)); + Push(std::forward(arg)); SetField(name, tableIndex); } @@ -732,7 +732,7 @@ namespace Nz template void LuaState::PushGlobal(const char* name, T&& arg) { - Push(std::forward(arg)); + Push(std::forward(arg)); SetGlobal(name); } @@ -742,15 +742,6 @@ namespace Nz PushGlobal(name.GetConstBuffer(), std::forward(arg)); } - template - void LuaState::PushInstance(const char* tname, const T& instance) const - { - T* userdata = static_cast(PushUserdata(sizeof(T))); - PlacementNew(userdata, instance); - - SetMetatable(tname); - } - template void LuaState::PushInstance(const char* tname, T&& instance) const {