mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:27:19 +08:00
Use nullptr
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user