From 1c0172cca4f1e90679321912e20436a7f42f122d Mon Sep 17 00:00:00 2001 From: Goraf <22941576+Goraf@users.noreply.github.com> Date: Sat, 24 Feb 2018 15:32:06 +0100 Subject: more nullptr --- plugins/MirLua/src/mlua.h | 2 +- plugins/MirLua/src/mlua_metatable.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/MirLua/src') diff --git a/plugins/MirLua/src/mlua.h b/plugins/MirLua/src/mlua.h index 06f4fe2287..21ace43dc6 100644 --- a/plugins/MirLua/src/mlua.h +++ b/plugins/MirLua/src/mlua.h @@ -6,7 +6,7 @@ struct HandleRefParam HANDLE h; int ref; lua_State *L; - HandleRefParam(HANDLE h) : L(NULL), h(h), ref(0) { } + HandleRefParam(HANDLE h) : L(nullptr), h(h), ref(0) { } HandleRefParam(lua_State *L, HANDLE h, int ref = 0) : L(L), h(h), ref(ref) { } }; diff --git a/plugins/MirLua/src/mlua_metatable.h b/plugins/MirLua/src/mlua_metatable.h index 7fb8c27578..c46d397dbb 100644 --- a/plugins/MirLua/src/mlua_metatable.h +++ b/plugins/MirLua/src/mlua_metatable.h @@ -120,7 +120,7 @@ private: static void Free(lua_State* /*L*/, T **obj) { - *obj = NULL; + *obj = nullptr; } static int lua__new(lua_State *L) @@ -128,7 +128,7 @@ private: T **udata = (T**)lua_newuserdata(L, sizeof(T*)); *udata = Init(L); - if (*udata == NULL) + if (*udata == nullptr) { lua_pushnil(L); return 1; @@ -319,7 +319,7 @@ public: static void Apply(lua_State *L, T *obj) { - if (obj == NULL) { + if (obj == nullptr) { lua_pushnil(L); return; } -- cgit v1.2.3