Lua/LuaClass: Fix compilation

This commit is contained in:
Lynix 2016-10-21 17:39:04 +02:00
parent 034f5cc8d7
commit 55a010e0de
1 changed files with 22 additions and 22 deletions

View File

@ -249,6 +249,28 @@ namespace Nz
lua.SetField("__tostring");
}
template<typename T, bool HasDestructor>
struct LuaClassImplFinalizerSetupProxy;
template<typename T>
struct LuaClassImplFinalizerSetupProxy<T, true>
{
static void Setup(LuaInstance& lua)
{
lua.PushValue(1); // ClassInfo
lua.PushCFunction(LuaClass<T>::FinalizerProxy, 1);
lua.SetField("__gc");
}
};
template<typename T>
struct LuaClassImplFinalizerSetupProxy<T, false>
{
static void Setup(LuaInstance&)
{
}
};
template<class T>
void LuaClass<T>::SetupFinalizer(LuaInstance& lua)
{
@ -566,28 +588,6 @@ namespace Nz
lua.PushString(info->name);
return 1;
}
template<typename T, bool HasDestructor>
struct LuaClassImplFinalizerSetupProxy;
template<typename T>
struct LuaClassImplFinalizerSetupProxy<T, true>
{
static void Setup(LuaInstance& lua)
{
lua.PushValue(1); // ClassInfo
lua.PushCFunction(LuaClass<T>::FinalizerProxy, 1);
lua.SetField("__gc");
}
};
template<typename T>
struct LuaClassImplFinalizerSetupProxy<T, false>
{
static void Setup(LuaInstance&)
{
}
};
}
#include <Nazara/Lua/DebugOff.hpp>