From aff9a743668575898d5eafe30e8e240e4a53342a Mon Sep 17 00:00:00 2001 From: Roberto Raggi Date: Tue, 10 Nov 2009 14:16:39 +0100 Subject: Cleanup NewArrayDeclaratorAST --- 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 a20f74372b..987c6a1664 100644 --- a/src/shared/cplusplus/AST.cpp +++ b/src/shared/cplusplus/AST.cpp @@ -1175,10 +1175,8 @@ unsigned NewTypeIdAST::firstToken() const unsigned NewTypeIdAST::lastToken() const { - for (NewArrayDeclaratorAST *it = new_array_declarators; it; it = it->next) { - if (! it->next) - return it->lastToken(); - } + if (new_array_declarators) + return new_array_declarators->lastToken(); for (PtrOperatorAST *it = ptr_operators; it; it = it->next) { if (it->next) -- cgit v1.2.1