Commit 6820f22b authored by Christian Kandeler's avatar Christian Kandeler

CppTools: Remove function replicating standard library functionality.

Change-Id: I0778aa3d91d8c62fcce7e07e2ceffa1970281ec6
Reviewed-by: default avatarChristian Kamm <christian.d.kamm@nokia.com>
parent 1b4cf42c
......@@ -68,6 +68,8 @@
#include <QtGui/QTextBlock>
#include <QtGui/QTextCursor>
#include <cctype>
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;
......
......@@ -35,8 +35,6 @@
#include <QtGui/QTextDocument>
#include <QtGui/QTextCursor>
#include <cctype>
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
......@@ -8,7 +8,6 @@ QT_FORWARD_DECLARE_CLASS(QTextCursor)
namespace CppTools {
void CPPTOOLS_EXPORT moveCursorToEndOfIdentifier(QTextCursor *tc);
bool CPPTOOLS_EXPORT isHexadecimal(char c);
} // CppTools
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment