From 11569852d4f219e01a155d6b728ec6f35fa21379 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 11 Jan 2023 14:13:09 +0100 Subject: [PATCH] CppEditor: Get rid of an unneeded use of std::tolower() Task-number: QTCREATORBUG-28612 Change-Id: I48a912b202ef0f0687c39600a14653d75df28215 Reviewed-by: hjk --- src/plugins/cppeditor/cppquickfixes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/cppeditor/cppquickfixes.cpp b/src/plugins/cppeditor/cppquickfixes.cpp index 424cfebc0cd..1025e278042 100644 --- a/src/plugins/cppeditor/cppquickfixes.cpp +++ b/src/plugins/cppeditor/cppquickfixes.cpp @@ -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());