summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaWindow.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-10-20 22:55:07 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-10-20 22:55:07 +0200
commit987f79afdd8945966d0dfa2d52539e005f771590 (patch)
treefa55849604121317e0a565465212032ebe4b79cb /src/Bindings/LuaWindow.cpp
parentUse std::recusive_mutex (diff)
downloadcuberite-987f79afdd8945966d0dfa2d52539e005f771590.tar
cuberite-987f79afdd8945966d0dfa2d52539e005f771590.tar.gz
cuberite-987f79afdd8945966d0dfa2d52539e005f771590.tar.bz2
cuberite-987f79afdd8945966d0dfa2d52539e005f771590.tar.lz
cuberite-987f79afdd8945966d0dfa2d52539e005f771590.tar.xz
cuberite-987f79afdd8945966d0dfa2d52539e005f771590.tar.zst
cuberite-987f79afdd8945966d0dfa2d52539e005f771590.zip
Diffstat (limited to '')
-rw-r--r--src/Bindings/LuaWindow.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Bindings/LuaWindow.cpp b/src/Bindings/LuaWindow.cpp
index c4d03b86b..35730878d 100644
--- a/src/Bindings/LuaWindow.cpp
+++ b/src/Bindings/LuaWindow.cpp
@@ -18,7 +18,7 @@
cLuaWindow::cLuaWindow(cWindow::WindowType a_WindowType, int a_SlotsX, int a_SlotsY, const AString & a_Title) :
super(a_WindowType, a_Title),
m_Contents(a_SlotsX, a_SlotsY),
- m_Plugin(NULL),
+ m_Plugin(nullptr),
m_LuaRef(LUA_REFNIL),
m_OnClosingFnRef(LUA_REFNIL),
m_OnSlotChangedFnRef(LUA_REFNIL)
@@ -70,7 +70,7 @@ cLuaWindow::~cLuaWindow()
void cLuaWindow::SetLuaRef(cPluginLua * a_Plugin, int a_LuaRef)
{
// Either m_Plugin is not set or equal to the passed plugin; only one plugin can use one cLuaWindow object
- ASSERT((m_Plugin == NULL) || (m_Plugin == a_Plugin));
+ ASSERT((m_Plugin == nullptr) || (m_Plugin == a_Plugin));
ASSERT(m_LuaRef == LUA_REFNIL);
m_Plugin = a_Plugin;
m_LuaRef = a_LuaRef;
@@ -82,7 +82,7 @@ void cLuaWindow::SetLuaRef(cPluginLua * a_Plugin, int a_LuaRef)
bool cLuaWindow::IsLuaReferenced(void) const
{
- return ((m_Plugin != NULL) && (m_LuaRef != LUA_REFNIL));
+ return ((m_Plugin != nullptr) && (m_LuaRef != LUA_REFNIL));
}
@@ -92,7 +92,7 @@ bool cLuaWindow::IsLuaReferenced(void) const
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 == NULL) || (m_Plugin == a_Plugin));
+ ASSERT((m_Plugin == nullptr) || (m_Plugin == a_Plugin));
// If there already was a function, unreference it first
if (m_OnClosingFnRef != LUA_REFNIL)
@@ -112,7 +112,7 @@ void cLuaWindow::SetOnClosing(cPluginLua * a_Plugin, int a_FnRef)
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 == NULL) || (m_Plugin == a_Plugin));
+ ASSERT((m_Plugin == nullptr) || (m_Plugin == a_Plugin));
// If there already was a function, unreference it first
if (m_OnSlotChangedFnRef != LUA_REFNIL)
@@ -134,7 +134,7 @@ bool cLuaWindow::ClosedByPlayer(cPlayer & a_Player, bool a_CanRefuse)
// First notify the plugin through the registered callback:
if (m_OnClosingFnRef != LUA_REFNIL)
{
- ASSERT(m_Plugin != NULL);
+ ASSERT(m_Plugin != nullptr);
if (m_Plugin->CallbackWindowClosing(m_OnClosingFnRef, *this, a_Player, a_CanRefuse))
{
// The callback disagrees (the higher levels check the CanRefuse flag compliance)
@@ -153,7 +153,7 @@ void cLuaWindow::Destroy(void)
{
super::Destroy();
- if ((m_LuaRef != LUA_REFNIL) && (m_Plugin != NULL))
+ if ((m_LuaRef != LUA_REFNIL) && (m_Plugin != nullptr))
{
// The object is referenced by Lua, un-reference it
m_Plugin->Unreference(m_LuaRef);