Use nullptr

This commit is contained in:
Roland Winklmeier
2018-08-24 15:19:35 +02:00
parent d4608e6a5b
commit 9b3b645c12
3 changed files with 5 additions and 5 deletions

View File

@@ -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;
}

View File

@@ -48,7 +48,7 @@ namespace BlackMisc
std::array<WCHAR, MAX_PATH> 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)
{

View File

@@ -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<wchar_t> language(nchars);
const int nchars = GetLocaleInfo(locale, LOCALE_SISO639LANGNAME, nullptr, 0);
std::vector<wchar_t> language(static_cast<size_t>(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());