forked from qt-creator/qt-creator
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:
@@ -1493,7 +1493,7 @@ void ConvertNumericLiteral::match(const CppQuickFixInterface &interface, QuickFi
|
|||||||
const int start = file->startOf(literal);
|
const int start = file->startOf(literal);
|
||||||
const char * const str = numeric->chars();
|
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 isOctal = numberLength >= 2 && str[0] == '0' && str[1] >= '0' && str[1] <= '7';
|
||||||
const bool isDecimal = !(isBinary || isOctal || numeric->isHex());
|
const bool isDecimal = !(isBinary || isOctal || numeric->isHex());
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user