diff options
Diffstat (limited to 'plugins/MirLua/src')
-rw-r--r-- | plugins/MirLua/src/m_chat.cpp | 2 | ||||
-rw-r--r-- | plugins/MirLua/src/m_clist.cpp | 2 | ||||
-rw-r--r-- | plugins/MirLua/src/m_core.cpp | 28 | ||||
-rw-r--r-- | plugins/MirLua/src/m_database.cpp | 20 | ||||
-rw-r--r-- | plugins/MirLua/src/m_genmenu.cpp | 2 | ||||
-rw-r--r-- | plugins/MirLua/src/m_hotkeys.cpp | 8 | ||||
-rw-r--r-- | plugins/MirLua/src/m_http.cpp | 14 | ||||
-rw-r--r-- | plugins/MirLua/src/m_icolib.cpp | 8 | ||||
-rw-r--r-- | plugins/MirLua/src/m_json.cpp | 6 | ||||
-rw-r--r-- | plugins/MirLua/src/m_message.cpp | 4 | ||||
-rw-r--r-- | plugins/MirLua/src/m_options.cpp | 2 | ||||
-rw-r--r-- | plugins/MirLua/src/m_protocols.cpp | 12 | ||||
-rw-r--r-- | plugins/MirLua/src/m_sounds.cpp | 2 | ||||
-rw-r--r-- | plugins/MirLua/src/m_srmm.cpp | 2 | ||||
-rw-r--r-- | plugins/MirLua/src/main.cpp | 4 | ||||
-rw-r--r-- | plugins/MirLua/src/mlua.cpp | 8 | ||||
-rw-r--r-- | plugins/MirLua/src/mlua_enviroment.cpp | 2 | ||||
-rw-r--r-- | plugins/MirLua/src/mlua_icons.cpp | 4 | ||||
-rw-r--r-- | plugins/MirLua/src/mlua_options.cpp | 8 | ||||
-rw-r--r-- | plugins/MirLua/src/mlua_utils.cpp | 2 |
20 files changed, 70 insertions, 70 deletions
diff --git a/plugins/MirLua/src/m_chat.cpp b/plugins/MirLua/src/m_chat.cpp index f84caa4591..ed57b7b9de 100644 --- a/plugins/MirLua/src/m_chat.cpp +++ b/plugins/MirLua/src/m_chat.cpp @@ -2,7 +2,7 @@ static luaL_Reg chatApi[] =
{
- { NULL, NULL }
+ { nullptr, nullptr }
};
LUAMOD_API int luaopen_m_chat(lua_State *L)
diff --git a/plugins/MirLua/src/m_clist.cpp b/plugins/MirLua/src/m_clist.cpp index d5d8d76a10..cc32c188db 100644 --- a/plugins/MirLua/src/m_clist.cpp +++ b/plugins/MirLua/src/m_clist.cpp @@ -89,7 +89,7 @@ static luaL_Reg clistApi[] = { "AddTrayMenuItem", clist_AddTrayMenuItem },
- { NULL, NULL }
+ { nullptr, nullptr }
};
LUAMOD_API int luaopen_m_clist(lua_State *L)
diff --git a/plugins/MirLua/src/m_core.cpp b/plugins/MirLua/src/m_core.cpp index bf3b5233cf..33214d061a 100644 --- a/plugins/MirLua/src/m_core.cpp +++ b/plugins/MirLua/src/m_core.cpp @@ -65,13 +65,13 @@ static int core_HookEvent(lua_State *L) lua_pushvalue(L, 2);
int ref = luaL_ref(L, LUA_REGISTRYINDEX);
- HANDLE res = NULL;
+ HANDLE res = nullptr;
CMLuaEnviroment *env = CMLuaEnviroment::GetEnviroment(L);
if (env)
res = HookEventObjParam(name, HookEventEnvParam, env, ref);
else
res = HookEventObjParam(name, HookEventLuaStateParam, L, ref);
- if (res == NULL)
+ if (res == nullptr)
{
luaL_unref(L, LUA_REGISTRYINDEX, ref);
lua_pushnil(L);
@@ -94,14 +94,14 @@ static int core_HookTemporaryEvent(lua_State *L) lua_pushvalue(L, 2);
int ref = luaL_ref(L, LUA_REGISTRYINDEX);
- HANDLE res = NULL;
+ HANDLE res = nullptr;
CMLuaEnviroment *env = CMLuaEnviroment::GetEnviroment(L);
if (env)
res = HookEventObjParam(name, HookEventEnvParam, env, ref);
else
res = HookEventObjParam(name, HookEventLuaStateParam, L, ref);
// event does not exists, call hook immideatelly
- if (res == NULL)
+ if (res == nullptr)
{
lua_pushnil(L);
lua_pushnil(L);
@@ -125,7 +125,7 @@ static int core_UnhookEvent(lua_State *L) if (!res)
{
HandleRefParam *param = (HandleRefParam*)CMLua::HookRefs.find(&hEvent);
- if (param != NULL)
+ if (param != nullptr)
{
luaL_unref(param->L, LUA_REGISTRYINDEX, param->ref);
CMLua::HookRefs.remove(param);
@@ -194,7 +194,7 @@ static int core_CreateServiceFunction(lua_State *L) lua_pushvalue(L, 2);
int ref = luaL_ref(L, LUA_REGISTRYINDEX);
- HANDLE res = NULL;
+ HANDLE res = nullptr;
CMLuaEnviroment *env = CMLuaEnviroment::GetEnviroment(L);
if (env)
res = CreateServiceFunctionObjParam(name, CreateServiceFunctionEnvParam, env, ref);
@@ -242,7 +242,7 @@ static int core_DestroyServiceFunction(lua_State *L) HANDLE hService = lua_touserdata(L, 1);
HandleRefParam *param = (HandleRefParam*)CMLua::ServiceRefs.find(&hService);
- if (param != NULL)
+ if (param != nullptr)
{
luaL_unref(param->L, LUA_REGISTRYINDEX, param->ref);
CMLua::ServiceRefs.remove(param);
@@ -303,7 +303,7 @@ static int core_Parse(lua_State *L) static int core_GetFullPath(lua_State *L)
{
wchar_t path[MAX_PATH];
- GetModuleFileName(NULL, path, MAX_PATH);
+ GetModuleFileName(nullptr, path, MAX_PATH);
lua_pushstring(L, ptrA(mir_utf8encodeW(path)));
@@ -405,13 +405,13 @@ luaL_Reg coreApi[] = { "ForkThread", core_ForkThread },
{ "TerminateThread", core_TerminateThread },
- { "Version", NULL },
+ { "Version", nullptr },
- { "NULL", NULL },
- { "INVALID_HANDLE_VALUE", NULL },
- { "CALLSERVICE_NOTFOUND", NULL },
+ { "NULL", nullptr },
+ { "INVALID_HANDLE_VALUE", nullptr },
+ { "CALLSERVICE_NOTFOUND", nullptr },
- { NULL, NULL }
+ { nullptr, nullptr }
};
/***********************************************/
@@ -419,7 +419,7 @@ luaL_Reg coreApi[] = LUAMOD_API int luaopen_m_core(lua_State *L)
{
luaL_newlib(L, coreApi);
- lua_pushlightuserdata(L, NULL);
+ lua_pushlightuserdata(L, nullptr);
lua_setfield(L, -2, "NULL");
lua_pushlightuserdata(L, INVALID_HANDLE_VALUE);
lua_setfield(L, -2, "INVALID_HANDLE_VALUE");
diff --git a/plugins/MirLua/src/m_database.cpp b/plugins/MirLua/src/m_database.cpp index 7519caa8c8..5556c77e5c 100644 --- a/plugins/MirLua/src/m_database.cpp +++ b/plugins/MirLua/src/m_database.cpp @@ -87,7 +87,7 @@ static int db_ContactIterator(lua_State *L) static int db_Contacts(lua_State *L)
{
- const char *szModule = NULL;
+ const char *szModule = nullptr;
switch (lua_type(L, 1))
{
@@ -131,7 +131,7 @@ static const char *mods[] = "FullName",
"Uid",
"DisplayName",
- NULL
+ nullptr
};
static int db_GetContactInfo(lua_State *L)
@@ -145,7 +145,7 @@ static int db_GetContactInfo(lua_State *L) type = luaL_checkinteger(L, 2);
break;
case LUA_TSTRING:
- type = luaL_checkoption(L, 2, NULL, mods) + 1;
+ type = luaL_checkoption(L, 2, nullptr, mods) + 1;
break;
default:
luaL_argerror(L, 2, luaL_typename(L, 2));
@@ -641,14 +641,14 @@ static luaL_Reg databaseApi[] = { "SetSetting", db_WriteSetting },
{ "DeleteSetting", db_DeleteSetting },
- { "DBVT_BYTE", NULL },
- { "DBVT_WORD", NULL },
- { "DBVT_DWORD", NULL },
- { "DBVT_ASCIIZ", NULL },
- { "DBVT_UTF8", NULL },
- { "DBVT_WCHAR", NULL },
+ { "DBVT_BYTE", nullptr },
+ { "DBVT_WORD", nullptr },
+ { "DBVT_DWORD", nullptr },
+ { "DBVT_ASCIIZ", nullptr },
+ { "DBVT_UTF8", nullptr },
+ { "DBVT_WCHAR", nullptr },
- { NULL, NULL }
+ { nullptr, nullptr }
};
/***********************************************/
diff --git a/plugins/MirLua/src/m_genmenu.cpp b/plugins/MirLua/src/m_genmenu.cpp index 4814a7410e..56ab193d52 100644 --- a/plugins/MirLua/src/m_genmenu.cpp +++ b/plugins/MirLua/src/m_genmenu.cpp @@ -122,7 +122,7 @@ static luaL_Reg genmenuApi[] = { "CheckMenuItem", genmenu_CheckMenuItem },
{ "RemoveMenuItem", genmenu_RemoveMenuItem },
- { NULL, NULL }
+ { nullptr, nullptr }
};
LUAMOD_API int luaopen_m_genmenu(lua_State *L)
diff --git a/plugins/MirLua/src/m_hotkeys.cpp b/plugins/MirLua/src/m_hotkeys.cpp index 2661197d2a..4988c80332 100644 --- a/plugins/MirLua/src/m_hotkeys.cpp +++ b/plugins/MirLua/src/m_hotkeys.cpp @@ -58,7 +58,7 @@ static int hotkeys_Unregister(lua_State *L) return 0;
}
-static const char *mods[] = { "shift", "ctrl", "alt", "ext", NULL };
+static const char *mods[] = { "shift", "ctrl", "alt", "ext", nullptr };
static int hotkeys_MakeHotkey(lua_State *L)
{
@@ -69,11 +69,11 @@ static int hotkeys_MakeHotkey(lua_State *L) mod = luaL_checkinteger(L, 1);
break;
case LUA_TSTRING:
- mod = (1 << (luaL_checkoption(L, 1, NULL, mods) - 1));
+ mod = (1 << (luaL_checkoption(L, 1, nullptr, mods) - 1));
break;
case LUA_TTABLE:
for (lua_pushnil(L); lua_next(L, 1); lua_pop(L, 1))
- mod |= (1 << (luaL_checkoption(L, -1, NULL, mods) - 1));
+ mod |= (1 << (luaL_checkoption(L, -1, nullptr, mods) - 1));
break;
default:
luaL_argerror(L, 1, luaL_typename(L, 1));
@@ -92,7 +92,7 @@ static luaL_Reg hotkeysApi[] = { "Register", hotkeys_Register },
{ "Unregister", hotkeys_Unregister },
- { NULL, NULL }
+ { nullptr, nullptr }
};
LUAMOD_API int luaopen_m_hotkeys(lua_State *L)
diff --git a/plugins/MirLua/src/m_http.cpp b/plugins/MirLua/src/m_http.cpp index ce09fdb392..e1aece0e12 100644 --- a/plugins/MirLua/src/m_http.cpp +++ b/plugins/MirLua/src/m_http.cpp @@ -103,7 +103,7 @@ static const luaL_Reg headersApi[] = { "__index", headers__index }, { "__len", headers__len }, - { NULL, NULL } + { nullptr, nullptr } }; /***********************************************/ @@ -155,7 +155,7 @@ static const luaL_Reg contentApi[] = { "__len", content__len }, { "__tostring", content__tostring }, - { NULL, NULL } + { nullptr, nullptr } }; /***********************************************/ @@ -213,7 +213,7 @@ static const luaL_Reg responseApi[] = { "__index", response__index }, { "__gc", response__gc }, - { NULL, NULL } + { nullptr, nullptr } }; /***********************************************/ @@ -301,7 +301,7 @@ static void request_SetContentType(lua_State *L, int idx, NETLIBHTTPREQUEST *req SetHeader(request, "Content-Type", type); } -static const char *httpMethods[] = { "GET", "POST", "PUT", "DELETE", NULL }; +static const char *httpMethods[] = { "GET", "POST", "PUT", "DELETE", nullptr }; static int request_Send(lua_State *L) { @@ -310,7 +310,7 @@ static int request_Send(lua_State *L) NETLIBHTTPREQUEST *request = CreateRequest(L); lua_getfield(L, 1, "Method"); - request->requestType = (1 << (luaL_checkoption(L, -1, NULL, httpMethods))); + request->requestType = (1 << (luaL_checkoption(L, -1, nullptr, httpMethods))); lua_pop(L, 1); lua_getfield(L, 1, "Url"); @@ -403,7 +403,7 @@ static const luaL_Reg requestApi[] = { { "__gc", request__gc }, - { NULL, NULL } + { nullptr, nullptr } }; /***********************************************/ @@ -416,7 +416,7 @@ static const luaL_Reg httpApi[] = { "Put", request_Put }, { "Delete", request_Delete }, - { NULL, NULL } + { nullptr, nullptr } }; LUAMOD_API int luaopen_m_http(lua_State *L) diff --git a/plugins/MirLua/src/m_icolib.cpp b/plugins/MirLua/src/m_icolib.cpp index d2904be320..d329d07ae4 100644 --- a/plugins/MirLua/src/m_icolib.cpp +++ b/plugins/MirLua/src/m_icolib.cpp @@ -25,7 +25,7 @@ static void MakeSKINICONDESC(lua_State *L, SKINICONDESC &sid) sid.defaultFile.w = mir_utf8decodeW(lua_tostring(L, -1));
lua_pop(L, 1);
- if (sid.defaultFile.w == NULL)
+ if (sid.defaultFile.w == nullptr)
{
sid.defaultFile.w = (wchar_t*)mir_calloc(MAX_PATH + 1);
GetModuleFileName(g_hInstance, sid.defaultFile.w, MAX_PATH);
@@ -61,7 +61,7 @@ static int lua_AddIcon(lua_State *L) sid.defaultFile.w = mir_utf8decodeW(lua_tostring(L, 4));
sid.hDefaultIcon = GetIcon(IDI_SCRIPT);
- if (sid.defaultFile.w == NULL)
+ if (sid.defaultFile.w == nullptr)
{
sid.defaultFile.w = (wchar_t*)mir_calloc(MAX_PATH + 1);
GetModuleFileName(g_hInstance, sid.defaultFile.w, MAX_PATH);
@@ -88,7 +88,7 @@ static int lua_GetIcon(lua_State *L) {
bool big = luaM_toboolean(L, 2);
- HICON hIcon = NULL;
+ HICON hIcon = nullptr;
switch (lua_type(L, 1))
{
case LUA_TLIGHTUSERDATA:
@@ -144,7 +144,7 @@ static luaL_Reg icolibApi[] = { "GetIconHandle", lua_GetIconHandle },
{ "RemoveIcon", lua_RemoveIcon },
- { NULL, NULL }
+ { nullptr, nullptr }
};
LUAMOD_API int luaopen_m_icolib(lua_State *L)
diff --git a/plugins/MirLua/src/m_json.cpp b/plugins/MirLua/src/m_json.cpp index e4bbf233ef..60f75411e9 100644 --- a/plugins/MirLua/src/m_json.cpp +++ b/plugins/MirLua/src/m_json.cpp @@ -133,7 +133,7 @@ const struct luaL_Reg jsonApi[] = { "__tostring", json__tostring }, { "__gc", json__gc }, - { NULL, NULL } + { nullptr, nullptr } }; @@ -195,7 +195,7 @@ static int lua_Encode(lua_State *L) break; } case LUA_TLIGHTUSERDATA: - if (lua_touserdata(L, 1) == NULL) + if (lua_touserdata(L, 1) == nullptr) { lua_pushliteral(L, "null"); break; @@ -212,7 +212,7 @@ static const luaL_Reg methods[] = { "Decode", lua_Decode }, { "Encode", lua_Encode }, - { NULL, NULL } + { nullptr, nullptr } }; LUAMOD_API int luaopen_m_json(lua_State *L) diff --git a/plugins/MirLua/src/m_message.cpp b/plugins/MirLua/src/m_message.cpp index 13cbba952d..c02adb0478 100644 --- a/plugins/MirLua/src/m_message.cpp +++ b/plugins/MirLua/src/m_message.cpp @@ -38,7 +38,7 @@ static int message_Send(lua_State *L) {
DBEVENTINFO dbei = {};
dbei.szModule = MODULE;
- dbei.timestamp = time(NULL);
+ dbei.timestamp = time(nullptr);
dbei.eventType = EVENTTYPE_MESSAGE;
dbei.cbBlob = (DWORD)mir_strlen(message);
dbei.pBlob = (PBYTE)mir_strdup(message);
@@ -59,7 +59,7 @@ static luaL_Reg messageApi[] = { "Paste", message_Paste },
{ "Send", message_Send },
- { NULL, NULL }
+ { nullptr, nullptr }
};
LUAMOD_API int luaopen_m_message(lua_State *L)
diff --git a/plugins/MirLua/src/m_options.cpp b/plugins/MirLua/src/m_options.cpp index ee968a6982..9c549e96a2 100644 --- a/plugins/MirLua/src/m_options.cpp +++ b/plugins/MirLua/src/m_options.cpp @@ -106,7 +106,7 @@ static luaL_Reg optionsApi[] = {
{ "AddPage", opt_AddPage },
- { NULL, NULL }
+ { nullptr, nullptr }
};
LUAMOD_API int luaopen_m_options(lua_State *L)
diff --git a/plugins/MirLua/src/m_protocols.cpp b/plugins/MirLua/src/m_protocols.cpp index ab206489f2..f4ea022175 100644 --- a/plugins/MirLua/src/m_protocols.cpp +++ b/plugins/MirLua/src/m_protocols.cpp @@ -1,10 +1,10 @@ #include "stdafx.h"
-HANDLE hRecvMessage = NULL;
+HANDLE hRecvMessage = nullptr;
static int lua_GetProtocol(lua_State *L)
{
- const char *szProto = NULL;
+ const char *szProto = nullptr;
switch (lua_type(L, 1))
{
@@ -109,7 +109,7 @@ static int lua_ChainRecv(lua_State *L) static int lua_GetAccount(lua_State *L)
{
- const char *name = NULL;
+ const char *name = nullptr;
switch (lua_type(L, 1))
{
@@ -157,7 +157,7 @@ static int lua_AccountIterator(lua_State *L) static int lua_Accounts(lua_State *L)
{
- const char *szProto = NULL;
+ const char *szProto = nullptr;
switch (lua_type(L, 1))
{
@@ -191,7 +191,7 @@ static int lua_Accounts(lua_State *L) static int lua_CallService(lua_State *L)
{
- const char *szModule = NULL;
+ const char *szModule = nullptr;
switch (lua_type(L, 1))
{
@@ -247,7 +247,7 @@ static luaL_Reg protocolsApi[] = { "CallService", lua_CallService },
- { NULL, NULL }
+ { nullptr, nullptr }
};
/***********************************************/
diff --git a/plugins/MirLua/src/m_sounds.cpp b/plugins/MirLua/src/m_sounds.cpp index 2acd36f203..f362e6b264 100644 --- a/plugins/MirLua/src/m_sounds.cpp +++ b/plugins/MirLua/src/m_sounds.cpp @@ -40,7 +40,7 @@ static luaL_Reg soundApi[] = { "PlaySound", lua_PlaySound },
{ "PlayFile", lua_PlayFile },
- { NULL, NULL }
+ { nullptr, nullptr }
};
LUAMOD_API int luaopen_m_sounds(lua_State *L)
diff --git a/plugins/MirLua/src/m_srmm.cpp b/plugins/MirLua/src/m_srmm.cpp index d29ca0d901..232fd0f7c8 100644 --- a/plugins/MirLua/src/m_srmm.cpp +++ b/plugins/MirLua/src/m_srmm.cpp @@ -108,7 +108,7 @@ static luaL_Reg srmmApi[] = { "ModifyButton", lua_ModifyButton }, { "RemoveButton", lua_RemoveButton }, - { NULL, NULL } + { nullptr, nullptr } }; /***********************************************/ diff --git a/plugins/MirLua/src/main.cpp b/plugins/MirLua/src/main.cpp index 7cb6ce4981..1795c56878 100644 --- a/plugins/MirLua/src/main.cpp +++ b/plugins/MirLua/src/main.cpp @@ -9,7 +9,7 @@ CMLua *g_mLua; HANDLE g_hCLibsFolder;
HANDLE g_hScriptsFolder;
-HNETLIBUSER hNetlib = NULL;
+HNETLIBUSER hNetlib = nullptr;
PLUGININFOEX pluginInfo =
{
@@ -104,7 +104,7 @@ extern "C" int __declspec(dllexport) Unload(void) if (hNetlib)
{
Netlib_CloseHandle(hNetlib);
- hNetlib = NULL;
+ hNetlib = nullptr;
}
return 0;
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);
diff --git a/plugins/MirLua/src/mlua_enviroment.cpp b/plugins/MirLua/src/mlua_enviroment.cpp index 268afc46b0..4e7225fd16 100644 --- a/plugins/MirLua/src/mlua_enviroment.cpp +++ b/plugins/MirLua/src/mlua_enviroment.cpp @@ -23,7 +23,7 @@ CMLuaEnviroment::~CMLuaEnviroment() CMLuaEnviroment* CMLuaEnviroment::GetEnviroment(lua_State *L) { if (!luaM_getenv(L)) - return NULL; + return nullptr; lua_rawgeti(L, -1, NULL); CMLuaEnviroment *env = (CMLuaEnviroment*)lua_touserdata(L, -1); diff --git a/plugins/MirLua/src/mlua_icons.cpp b/plugins/MirLua/src/mlua_icons.cpp index 92bcd1dcd5..4b13f8c52e 100644 --- a/plugins/MirLua/src/mlua_icons.cpp +++ b/plugins/MirLua/src/mlua_icons.cpp @@ -20,7 +20,7 @@ HICON GetIcon(int iconId) if (Icons[i].defIconID == iconId)
return IcoLib_GetIconByHandle(Icons[i].hIcolib);
- return NULL;
+ return nullptr;
}
HANDLE GetIconHandle(int iconId)
@@ -29,5 +29,5 @@ HANDLE GetIconHandle(int iconId) if (Icons[i].defIconID == iconId)
return Icons[i].hIcolib;
- return NULL;
+ return nullptr;
}
\ No newline at end of file diff --git a/plugins/MirLua/src/mlua_options.cpp b/plugins/MirLua/src/mlua_options.cpp index b4e11cb01d..6a2dbd669b 100644 --- a/plugins/MirLua/src/mlua_options.cpp +++ b/plugins/MirLua/src/mlua_options.cpp @@ -61,12 +61,12 @@ void CMLuaOptions::OnInitDialog() wchar_t scriptDir[MAX_PATH], relativeScriptDir[MAX_PATH], header[MAX_PATH + 100];
FoldersGetCustomPathT(g_hScriptsFolder, scriptDir, _countof(scriptDir), VARSW(MIRLUA_PATHT));
- PathToRelativeW(scriptDir, relativeScriptDir, NULL);
+ PathToRelativeW(scriptDir, relativeScriptDir, nullptr);
mir_snwprintf(header, L"%s (%s)", TranslateT("Common scripts"), relativeScriptDir);
m_scripts.AddColumn(0, L"Script", 380);
- m_scripts.AddColumn(1, NULL, 32 - GetSystemMetrics(SM_CXVSCROLL));
- m_scripts.AddColumn(2, NULL, 32 - GetSystemMetrics(SM_CXVSCROLL));
+ m_scripts.AddColumn(1, nullptr, 32 - GetSystemMetrics(SM_CXVSCROLL));
+ m_scripts.AddColumn(2, nullptr, 32 - GetSystemMetrics(SM_CXVSCROLL));
LoadScripts();
@@ -126,7 +126,7 @@ void CMLuaOptions::OnScriptListClick(CCtrlListView::TEventInfo *evt) switch (lvi.iSubItem)
{
case 1:
- ShellExecute(m_hwnd, L"Open", script->GetFilePath(), NULL, NULL, SW_SHOWNORMAL);
+ ShellExecute(m_hwnd, L"Open", script->GetFilePath(), nullptr, nullptr, SW_SHOWNORMAL);
break;
case 2:
diff --git a/plugins/MirLua/src/mlua_utils.cpp b/plugins/MirLua/src/mlua_utils.cpp index 9abbc6e492..9275b74a7f 100644 --- a/plugins/MirLua/src/mlua_utils.cpp +++ b/plugins/MirLua/src/mlua_utils.cpp @@ -32,7 +32,7 @@ void ShowNotification(const char *caption, const char *message, int flags, MCONT return;
}
- MessageBoxA(NULL, message, caption, MB_OK | flags);
+ MessageBoxA(nullptr, message, caption, MB_OK | flags);
}
void ObsoleteMethod(lua_State *L, const char *message)
|