From a7c24ca48995cf2bf436156302f96b91bf135409 Mon Sep 17 00:00:00 2001 From: Goraf <22941576+Goraf@users.noreply.github.com> Date: Mon, 13 Nov 2017 15:03:31 +0100 Subject: Code modernize ... * replace 0/NULL with nullptr [using clang-tidy] --- plugins/MirLua/src/mlua.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/MirLua/src/mlua.cpp') diff --git a/plugins/MirLua/src/mlua.cpp b/plugins/MirLua/src/mlua.cpp index 952e528e44..150f5639ab 100644 --- a/plugins/MirLua/src/mlua.cpp +++ b/plugins/MirLua/src/mlua.cpp @@ -10,7 +10,7 @@ static int CompareScripts(const CMLuaScript* p1, const CMLuaScript* p2) return mir_strcmpi(p1->GetModuleName(), p2->GetModuleName()); } -CMLua::CMLua() : L(NULL), Scripts(10, CompareScripts) +CMLua::CMLua() : L(nullptr), Scripts(10, CompareScripts) { MUUID muidLast = MIID_LAST; hMLuaLangpack = GetPluginLangId(muidLast, 0); @@ -67,7 +67,7 @@ static int mlua_toansi(lua_State *L) int codepage = luaL_optinteger(L, 2, Langpack_GetDefaultCodePage()); ptrA string(mir_strdup(value)); - lua_pushstring(L, mir_utf8decodecp(string, codepage, NULL)); + lua_pushstring(L, mir_utf8decodecp(string, codepage, nullptr)); return 1; } @@ -270,7 +270,7 @@ void CMLua::KillLuaRefs() while (HookRefs.getCount()) { HandleRefParam *param = (HandleRefParam*)HookRefs[0]; - if (param != NULL) + if (param != nullptr) { luaL_unref(param->L, LUA_REGISTRYINDEX, param->ref); HookRefs.remove(0); @@ -281,7 +281,7 @@ void CMLua::KillLuaRefs() while (ServiceRefs.getCount()) { HandleRefParam *param = (HandleRefParam*)ServiceRefs[0]; - if (param != NULL) + if (param != nullptr) { luaL_unref(param->L, LUA_REGISTRYINDEX, param->ref); ServiceRefs.remove(0); -- cgit v1.2.3