CppEditor: Get rid of an unneeded use of std::tolower()

Task-number: QTCREATORBUG-28612
Change-Id: I48a912b202ef0f0687c39600a14653d75df28215
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2023-01-11 14:13:09 +01:00
parent 14a70e1514
commit 11569852d4

View File

@@ -1493,7 +1493,7 @@ void ConvertNumericLiteral::match(const CppQuickFixInterface &interface, QuickFi
const int start = file->startOf(literal);
const char * const str = numeric->chars();
const bool isBinary = numberLength > 2 && str[0] == '0' && tolower(str[1]) == 'b';
const bool isBinary = numberLength > 2 && str[0] == '0' && (str[1] == 'b' || str[1] == 'B');
const bool isOctal = numberLength >= 2 && str[0] == '0' && str[1] >= '0' && str[1] <= '7';
const bool isDecimal = !(isBinary || isOctal || numeric->isHex());