From 6820f22bbd4946f1007bbb1836b620ba62a5aba1 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 25 Oct 2011 14:06:39 +0200 Subject: [PATCH] CppTools: Remove function replicating standard library functionality. Change-Id: I0778aa3d91d8c62fcce7e07e2ceffa1970281ec6 Reviewed-by: Christian Kamm --- src/plugins/cppeditor/cppquickfixes.cpp | 4 +++- src/plugins/cpptools/cpptoolsreuse.cpp | 9 --------- src/plugins/cpptools/cpptoolsreuse.h | 1 - 3 files changed, 3 insertions(+), 11 deletions(-) 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