diff options
author | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:03:31 +0100 |
---|---|---|
committer | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:07:33 +0100 |
commit | a7c24ca48995cf2bf436156302f96b91bf135409 (patch) | |
tree | 953835509ff1b778833e78fd7b74b05e05e77c84 /plugins/MirLua/src/mlua.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/MirLua/src/mlua.cpp')
-rw-r--r-- | plugins/MirLua/src/mlua.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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);
|