QLocale/Win: replace 0 with nullptr in winLangCodeToIsoName()

The function returns a pointer, not an integer.

Found while working on QTBUG-103721.

Change-Id: I18a9987d99c645a5b410c4b11128bfebcc5dcddd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
bb10
Marc Mutz 2022-07-18 11:55:01 +02:00
parent 424438a220
commit 1a40bc37d4
1 changed files with 2 additions and 2 deletions

View File

@ -1019,7 +1019,7 @@ static const char *winLangCodeToIsoName(int code)
{
int cmp = code - windows_to_iso_list[0].windows_code;
if (cmp < 0)
return 0;
return nullptr;
if (cmp == 0)
return windows_to_iso_list[0].iso_name;
@ -1031,7 +1031,7 @@ static const char *winLangCodeToIsoName(int code)
if (it != std::end(windows_to_iso_list) && !ByWindowsCode{}(code, *it))
return it->iso_name;
return 0;
return nullptr;
}