diff options
Diffstat (limited to 'src/shared/cplusplus/AST.cpp')
-rw-r--r-- | src/shared/cplusplus/AST.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/shared/cplusplus/AST.cpp b/src/shared/cplusplus/AST.cpp index 987c6a1664..035f5dae37 100644 --- a/src/shared/cplusplus/AST.cpp +++ b/src/shared/cplusplus/AST.cpp @@ -1331,10 +1331,8 @@ unsigned PostfixExpressionAST::firstToken() const unsigned PostfixExpressionAST::lastToken() const { - for (PostfixAST *it = postfix_expressions; it; it = it->next) { - if (! it->next) - return it->lastToken(); - } + if (postfix_expressions) + return postfix_expressions->lastToken(); return base_expression->lastToken(); } |