Skip to content

Commit 5a42c89

Browse files
committed
removed unnecessary lastLineTok() call
1 parent 38618cf commit 5a42c89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

simplecpp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -762,8 +762,8 @@ void simplecpp::TokenList::readfile(Stream &stream, const std::string &filename,
762762
TokenString currentToken;
763763

764764
if (cback() && cback()->location.line == location.line && cback()->previous && cback()->previous->op == '#') {
765-
const Token* const llTok = lastLineTok();
766-
if (llTok && llTok->op == '#' && llTok->next && (llTok->next->str() == "error" || llTok->next->str() == "warning")) {
765+
const Token* const ppTok = cback()->previous;
766+
if (ppTok->next && (ppTok->next->str() == "error" || ppTok->next->str() == "warning")) {
767767
char prev = ' ';
768768
while (stream.good() && (prev == '\\' || (ch != '\r' && ch != '\n'))) {
769769
currentToken += ch;

0 commit comments

Comments
 (0)