From a7219736b6081888a35aa5f58fcec4abc8dfad44 Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Tue, 10 Nov 2009 14:24:32 +0100 Subject: Cleanup Postfix operators. --- src/shared/cplusplus/AST.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/shared/cplusplus/AST.cpp') 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(); } -- cgit v1.2.1