diff --git a/src/blackinput/win/keyboardwindows.cpp b/src/blackinput/win/keyboardwindows.cpp index f45df2c84..11776ff77 100644 --- a/src/blackinput/win/keyboardwindows.cpp +++ b/src/blackinput/win/keyboardwindows.cpp @@ -79,7 +79,7 @@ namespace BlackInput { Q_ASSERT_X(g_keyboardWindows == nullptr, "CKeyboardWindows::init", "Windows supports only one keyboard instance. Cannot initialize a second one!"); g_keyboardWindows = this; - m_keyboardHook = SetWindowsHookEx(WH_KEYBOARD_LL, CKeyboardWindows::keyboardProc, GetModuleHandle(NULL), 0); + m_keyboardHook = SetWindowsHookEx(WH_KEYBOARD_LL, CKeyboardWindows::keyboardProc, GetModuleHandle(nullptr), 0); return true; } diff --git a/src/blackmisc/processctrl.cpp b/src/blackmisc/processctrl.cpp index 4c8816e54..d41c30501 100644 --- a/src/blackmisc/processctrl.cpp +++ b/src/blackmisc/processctrl.cpp @@ -48,7 +48,7 @@ namespace BlackMisc std::array wszCommandLine = {{}}; command.toWCharArray(wszCommandLine.data()); - int result = CreateProcess (nullptr, wszCommandLine.data(), 0, 0, inherit, flags, nullptr, nullptr, &startupInfo, &processInfo); + int result = CreateProcess (nullptr, wszCommandLine.data(), nullptr, nullptr, inherit, flags, nullptr, nullptr, &startupInfo, &processInfo); if (result == 0) { diff --git a/src/blackmisc/windllutils.cpp b/src/blackmisc/windllutils.cpp index 67b10d500..17c868af8 100644 --- a/src/blackmisc/windllutils.cpp +++ b/src/blackmisc/windllutils.cpp @@ -32,8 +32,8 @@ namespace BlackMisc QString languageToIsoCode(LanguageCodePage codePage) { const LCID locale = codePage.wLanguage; - const int nchars = GetLocaleInfo(locale, LOCALE_SISO639LANGNAME, NULL, 0); - std::vector language(nchars); + const int nchars = GetLocaleInfo(locale, LOCALE_SISO639LANGNAME, nullptr, 0); + std::vector language(static_cast(nchars)); GetLocaleInfo(locale, LOCALE_SISO639LANGNAME, language.data(), nchars); const QString iso = QString::fromWCharArray(language.data(), nchars); return iso; @@ -76,7 +76,7 @@ namespace BlackMisc VS_FIXEDFILEINFO *pFileInfo = nullptr; // Get the version info for the file requested - dwSize = GetFileVersionInfoSize(pszFilePath, NULL); + dwSize = GetFileVersionInfoSize(pszFilePath, nullptr); if (dwSize == 0) { result.errorMsg = QString("Error in GetFileVersionInfoSize: %1\n").arg(GetLastError());