Skip to content

Commit cd2365c

Browse files
committed
removed unnecessary lastLineTok() call
1 parent dc9d593 commit cd2365c

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
@@ -759,8 +759,8 @@ void simplecpp::TokenList::readfile(Stream &stream, const std::string &filename,
759759
TokenString currentToken;
760760

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

0 commit comments

Comments
 (0)