From f949d8dde0e3804094f59666d05c5ad2febbb887 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 28 Jan 2021 21:16:03 +0100 Subject: [PATCH] Fixed a Clang compile error. --- es-core/src/utils/StringUtil.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/es-core/src/utils/StringUtil.cpp b/es-core/src/utils/StringUtil.cpp index 00394b14e..6145451fe 100644 --- a/es-core/src/utils/StringUtil.cpp +++ b/es-core/src/utils/StringUtil.cpp @@ -348,7 +348,7 @@ namespace Utils // Try to find an entry for the character in the Unicode uppercase table. wchar_t* charIndex = std::wcschr(unicodeUppercase, unicodeChar); - if (charIndex > 0) { + if (charIndex != nullptr) { wchar_t lowerChar = *(unicodeLowercase + (charIndex - unicodeUppercase)); // Convert back to string format. typedef std::codecvt_utf8 convert_type; @@ -401,7 +401,7 @@ namespace Utils // Try to find an entry for the character in the Unicode lowercase table. wchar_t* charIndex = std::wcschr(unicodeLowercase, unicodeChar); - if (charIndex > 0) { + if (charIndex != nullptr) { wchar_t upperChar = *(unicodeUppercase + (charIndex - unicodeLowercase)); // Convert back to string format. typedef std::codecvt_utf8 convert_type;