forked from qt-creator/qt-creator
Use isEmpty() instead of count() or size()
Change-Id: I0a89d2808c6d041da0dc41ea5aea58e6e8759bb4 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -74,7 +74,7 @@ void CppHighlighter::highlightBlock(const QString &text)
|
||||
if (tokens.isEmpty()) {
|
||||
setCurrentBlockState((braceDepth << 8) | lexerState);
|
||||
TextDocumentLayout::clearParentheses(currentBlock());
|
||||
if (text.length()) {// the empty line can still contain whitespace
|
||||
if (!text.isEmpty()) {// the empty line can still contain whitespace
|
||||
if (initialLexerState == T_COMMENT)
|
||||
setFormatWithSpaces(text, 0, text.length(), formatForCategory(C_COMMENT));
|
||||
else if (initialLexerState == T_DOXY_COMMENT)
|
||||
|
||||
Reference in New Issue
Block a user