From 70448b016d5a5071cd827c5fd64d8ea66a59e65a Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Tue, 15 Jun 2010 14:28:36 +0200 Subject: [PATCH] QmlJS: Don't unnecessarily store the multiline comment state. The 'state' value already holds the same information. Reviewed-by: Erik Verbruggen --- src/plugins/qmljseditor/qmljshighlighter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/qmljseditor/qmljshighlighter.cpp b/src/plugins/qmljseditor/qmljshighlighter.cpp index 8ba5ab7ec58..f3b905e32e4 100644 --- a/src/plugins/qmljseditor/qmljshighlighter.cpp +++ b/src/plugins/qmljseditor/qmljshighlighter.cpp @@ -326,8 +326,8 @@ int Highlighter::onBlockStart() int previousState = previousBlockState(); if (previousState != -1) { state = previousState & 0xff; - m_inMultilineComment = (previousState >> 8) & 0xff; - m_braceDepth = previousState >> 16; + m_braceDepth = previousState >> 8; + m_inMultilineComment = (state == Scanner::MultiLineComment); } m_foldingIndent = m_braceDepth; @@ -338,7 +338,7 @@ void Highlighter::onBlockEnd(int state) { typedef TextEditor::TextBlockUserData TextEditorBlockData; - setCurrentBlockState((m_braceDepth << 16) | (m_inMultilineComment << 8) | state); + setCurrentBlockState((m_braceDepth << 8) | state); TextEditor::BaseTextDocumentLayout::setParentheses(currentBlock(), m_currentBlockParentheses); TextEditor::BaseTextDocumentLayout::setFoldingIndent(currentBlock(), m_foldingIndent); }