Skip to content

Commit cdd8a9e

Browse files
committed
no more need to update inTriple. flag as const. should resolve coverity scan warning
1 parent 0215213 commit cdd8a9e

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/lammpssyntax.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ LineTokens tokenizeLine(const QString &text, int prevState)
7676
const bool contIn = inFlags & SyntaxState::CONTINUE;
7777
const bool midIn = inFlags & SyntaxState::MIDWORD;
7878
const bool commentIn = inFlags & SyntaxState::COMMENT;
79-
bool inTriple = inFlags & SyntaxState::TRIPLE;
79+
const bool inTriple = inFlags & SyntaxState::TRIPLE;
8080
bool inSingle = inFlags & SyntaxState::SINGLEQ;
8181
bool inDouble = inFlags & SyntaxState::DOUBLEQ;
8282

@@ -130,7 +130,6 @@ LineTokens tokenizeLine(const QString &text, int prevState)
130130
return result;
131131
}
132132
addToken(0, close + 3, TokType::TripleString, argsUsed);
133-
inTriple = false;
134133
i = close + 3;
135134
pendingArg = argsUsed;
136135
} else if (inSingle || inDouble) {
@@ -206,9 +205,8 @@ LineTokens tokenizeLine(const QString &text, int prevState)
206205
// multi-line triple-quoted block opens here; the rest of the
207206
// physical line (including any trailing '&') is string content
208207
addToken(i, len - i, TokType::TripleString, wordArg);
209-
inTriple = true;
210-
exit = Exit::TripleOpen;
211-
i = len;
208+
exit = Exit::TripleOpen;
209+
i = len;
212210
break;
213211
}
214212
addToken(i, close + 3 - i, TokType::TripleString, wordArg);

0 commit comments

Comments
 (0)