From ca6ef58b1ee8521e4b940ee4883dee714960e413 Mon Sep 17 00:00:00 2001 From: LogicParrot Date: Fri, 5 Feb 2016 23:45:45 +0200 Subject: Bulk clearing of whitespace --- src/Bindings/LuaWindow.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/Bindings/LuaWindow.cpp') diff --git a/src/Bindings/LuaWindow.cpp b/src/Bindings/LuaWindow.cpp index 5f7832ef5..706397a27 100644 --- a/src/Bindings/LuaWindow.cpp +++ b/src/Bindings/LuaWindow.cpp @@ -25,7 +25,7 @@ cLuaWindow::cLuaWindow(cWindow::WindowType a_WindowType, int a_SlotsX, int a_Slo { m_Contents.AddListener(*this); m_SlotAreas.push_back(new cSlotAreaItemGrid(m_Contents, *this)); - + // If appropriate, add an Armor slot area: switch (a_WindowType) { @@ -93,13 +93,13 @@ void cLuaWindow::SetOnClosing(cPluginLua * a_Plugin, int a_FnRef) { // Either m_Plugin is not set or equal to the passed plugin; only one plugin can use one cLuaWindow object ASSERT((m_Plugin == nullptr) || (m_Plugin == a_Plugin)); - + // If there already was a function, unreference it first if (m_OnClosingFnRef != LUA_REFNIL) { m_Plugin->Unreference(m_OnClosingFnRef); } - + // Store the new reference m_Plugin = a_Plugin; m_OnClosingFnRef = a_FnRef; @@ -113,13 +113,13 @@ void cLuaWindow::SetOnSlotChanged(cPluginLua * a_Plugin, int a_FnRef) { // Either m_Plugin is not set or equal to the passed plugin; only one plugin can use one cLuaWindow object ASSERT((m_Plugin == nullptr) || (m_Plugin == a_Plugin)); - + // If there already was a function, unreference it first if (m_OnSlotChangedFnRef != LUA_REFNIL) { m_Plugin->Unreference(m_OnSlotChangedFnRef); } - + // Store the new reference m_Plugin = a_Plugin; m_OnSlotChangedFnRef = a_FnRef; @@ -141,7 +141,7 @@ bool cLuaWindow::ClosedByPlayer(cPlayer & a_Player, bool a_CanRefuse) return false; } } - + return super::ClosedByPlayer(a_Player, a_CanRefuse); } @@ -152,13 +152,13 @@ bool cLuaWindow::ClosedByPlayer(cPlayer & a_Player, bool a_CanRefuse) void cLuaWindow::Destroy(void) { super::Destroy(); - + if ((m_LuaRef != LUA_REFNIL) && (m_Plugin != nullptr)) { // The object is referenced by Lua, un-reference it m_Plugin->Unreference(m_LuaRef); } - + // Lua will take care of this object, it will garbage-collect it, so we must not delete it! m_IsDestroyed = false; } @@ -192,7 +192,7 @@ void cLuaWindow::OnSlotChanged(cItemGrid * a_ItemGrid, int a_SlotNum) ASSERT(!"Invalid ItemGrid in callback"); return; } - + // If an OnSlotChanged callback has been registered, call it: if (m_OnSlotChangedFnRef != LUA_REFNIL) { -- cgit v1.2.3