From 24b6c858ebc3a16e9a82c0ea6e8fc6743f0e3229 Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Tue, 10 Nov 2009 14:33:51 +0100 Subject: Cleanup postfix declarators. --- 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 035f5dae37..30ba2cba5a 100644 --- a/src/shared/cplusplus/AST.cpp +++ b/src/shared/cplusplus/AST.cpp @@ -560,10 +560,8 @@ unsigned DeclaratorAST::lastToken() const return it->lastToken(); } - for (PostfixDeclaratorAST *it = postfix_declarators; it; it = it->next) { - if (! it->next) - return it->lastToken(); - } + if (postfix_declarators) + return postfix_declarators->lastToken(); if (core_declarator) return core_declarator->lastToken(); -- cgit v1.2.1