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/AutoRun/src/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/AutoRun/src') diff --git a/plugins/AutoRun/src/main.cpp b/plugins/AutoRun/src/main.cpp index 0923879dab..559f636240 100644 --- a/plugins/AutoRun/src/main.cpp +++ b/plugins/AutoRun/src/main.cpp @@ -28,7 +28,7 @@ void GetProfilePath(wchar_t *res, size_t resLen) { wchar_t dbname[MAX_PATH], exename[MAX_PATH]; Profile_GetNameW(_countof(dbname), dbname); - GetModuleFileName(NULL, exename, _countof(exename)); + GetModuleFileName(nullptr, exename, _countof(exename)); wchar_t *p = wcsrchr(dbname, '.'); if (p) *p = 0; @@ -42,7 +42,7 @@ static void SetAutorun(BOOL autorun) DWORD dw; switch (autorun) { case TRUE: - if ( RegCreateKeyEx(ROOT_KEY, SUB_KEY, 0, NULL, 0, KEY_CREATE_SUB_KEY|KEY_SET_VALUE,NULL,&hKey,&dw) == ERROR_SUCCESS) { + if ( RegCreateKeyEx(ROOT_KEY, SUB_KEY, 0, nullptr, 0, KEY_CREATE_SUB_KEY|KEY_SET_VALUE,nullptr,&hKey,&dw) == ERROR_SUCCESS) { wchar_t result[MAX_PATH]; GetProfilePath(result, _countof(result)); RegSetValueEx(hKey, L"MirandaNG", 0, REG_SZ, (BYTE*)result, sizeof(wchar_t)*(DWORD)mir_wstrlen(result)); @@ -66,7 +66,7 @@ static BOOL CmpCurrentAndRegistry() wchar_t result[MAX_PATH], dbpath[MAX_PATH]; DWORD dwBufLen = MAX_PATH; - if ( RegQueryValueEx(hKey, L"MirandaNG", NULL, NULL, (LPBYTE)dbpath, &dwBufLen) != ERROR_SUCCESS) + if ( RegQueryValueEx(hKey, L"MirandaNG", nullptr, nullptr, (LPBYTE)dbpath, &dwBufLen) != ERROR_SUCCESS) return FALSE; GetProfilePath(result, _countof(result)); -- cgit v1.2.3