diff --git a/src/plugins/cppeditor/cppquickfixes.cpp b/src/plugins/cppeditor/cppquickfixes.cpp index 5e44f7be22e..f1d86076261 100644 --- a/src/plugins/cppeditor/cppquickfixes.cpp +++ b/src/plugins/cppeditor/cppquickfixes.cpp @@ -68,6 +68,8 @@ #include #include +#include + using namespace CppEditor; using namespace CppEditor::Internal; using namespace CppTools; @@ -1283,7 +1285,7 @@ public: // remove trailing L or U and stuff const char * const spell = numeric->chars(); int numberLength = numeric->size(); - while (numberLength > 0 && !isHexadecimal(spell[numberLength - 1])) + while (numberLength > 0 && !std::isxdigit(spell[numberLength - 1])) --numberLength; if (numberLength < 1) return result; diff --git a/src/plugins/cpptools/cpptoolsreuse.cpp b/src/plugins/cpptools/cpptoolsreuse.cpp index 0d0288a228c..ed97b677392 100644 --- a/src/plugins/cpptools/cpptoolsreuse.cpp +++ b/src/plugins/cpptools/cpptoolsreuse.cpp @@ -35,8 +35,6 @@ #include #include -#include - namespace CppTools { void moveCursorToEndOfIdentifier(QTextCursor *tc) { @@ -51,11 +49,4 @@ void moveCursorToEndOfIdentifier(QTextCursor *tc) { } } -bool isHexadecimal(char c) -{ - return std::isdigit(c) - || (c >= 'a' && c <= 'f') - || (c >= 'A' && c <= 'F'); -} - } // CppTools diff --git a/src/plugins/cpptools/cpptoolsreuse.h b/src/plugins/cpptools/cpptoolsreuse.h index 115f1d41053..3be58382fdb 100644 --- a/src/plugins/cpptools/cpptoolsreuse.h +++ b/src/plugins/cpptools/cpptoolsreuse.h @@ -8,7 +8,6 @@ QT_FORWARD_DECLARE_CLASS(QTextCursor) namespace CppTools { void CPPTOOLS_EXPORT moveCursorToEndOfIdentifier(QTextCursor *tc); -bool CPPTOOLS_EXPORT isHexadecimal(char c); } // CppTools