From d97087fc8bce2b6794bcfd4b78a780e2f06a79d7 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Thu, 19 Mar 2015 15:40:49 +0000 Subject: [PATCH] lua: fix compilation issues. --- src/imgui/lolimgui.cpp | 2 -- src/lolua/baselua.h | 26 +++++++++++++++++--------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/imgui/lolimgui.cpp b/src/imgui/lolimgui.cpp index cdf99ce9..a32a5646 100644 --- a/src/imgui/lolimgui.cpp +++ b/src/imgui/lolimgui.cpp @@ -135,8 +135,6 @@ void LolImGui::TickGame(float seconds) //Init Texture if (!m_font) { - ImGuiIO& io = ImGui::GetIO(); - // Build texture unsigned char* pixels; ivec2 size; diff --git a/src/lolua/baselua.h b/src/lolua/baselua.h index 4e51ab7e..46e8cb13 100644 --- a/src/lolua/baselua.h +++ b/src/lolua/baselua.h @@ -227,14 +227,7 @@ protected: } //------------------------------------------------------------------------- - template - static int Del(LuaState * l) - { - VarPtr obj; obj.Get(l, 1); - ASSERT(obj()); - delete obj(); - return 0; - } + template static int Del(LuaState * l); }; //----------------------------------------------------------------------------- @@ -281,7 +274,7 @@ public: inline T* operator=(T* value) { m_value = value; } inline bool IsValid(LuaState* l, int index) { - return InnerValid(l, index); + return InnerIsValid(l, index); } private: inline void GetInc(LuaState* l, int& index) @@ -321,6 +314,21 @@ protected: *data = m_value; } }; + +// +// Object member implementations that require VarPtr +// + +template +int Object::Del(LuaState * l) +{ + VarPtr obj; + obj.Get(l, 1); + ASSERT(obj()); + delete obj(); + return 0; +} + //----------------------------------------------------------------------------- /* TODO: FIX THAT TOUKY !! template