diff --git a/src/libs/3rdparty/cplusplus/Lexer.cpp b/src/libs/3rdparty/cplusplus/Lexer.cpp index a5112ba8195..c1cec4a756f 100644 --- a/src/libs/3rdparty/cplusplus/Lexer.cpp +++ b/src/libs/3rdparty/cplusplus/Lexer.cpp @@ -104,12 +104,6 @@ void Lexer::pushLineStartOffset() _translationUnit->pushLineOffset(_currentChar - _firstChar); } -unsigned Lexer::tokenOffset() const -{ return _tokenStart - _firstChar; } - -unsigned Lexer::tokenLength() const -{ return _currentChar - _tokenStart; } - void Lexer::scan(Token *tok) { tok->reset(); diff --git a/src/libs/3rdparty/cplusplus/Lexer.h b/src/libs/3rdparty/cplusplus/Lexer.h index 85fe6d2d6bf..43a877e7a84 100644 --- a/src/libs/3rdparty/cplusplus/Lexer.h +++ b/src/libs/3rdparty/cplusplus/Lexer.h @@ -44,9 +44,6 @@ public: inline void operator()(Token *tok) { scan(tok); } - unsigned tokenOffset() const; - unsigned tokenLength() const; - bool scanCommentTokens() const; void setScanCommentTokens(bool onoff); diff --git a/src/libs/cplusplus/SimpleLexer.cpp b/src/libs/cplusplus/SimpleLexer.cpp index 44115775890..578c09ac9e3 100644 --- a/src/libs/cplusplus/SimpleLexer.cpp +++ b/src/libs/cplusplus/SimpleLexer.cpp @@ -89,7 +89,7 @@ QList SimpleLexer::operator()(const QString &text, int state) break; } - QStringRef spell = text.midRef(lex.tokenOffset(), lex.tokenLength()); + QStringRef spell = text.midRef(tk.begin(), tk.length()); lex.setScanAngleStringLiteralTokens(false); if (tk.f.newline && tk.is(T_POUND))