diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2009-11-10 14:16:39 +0100 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2009-11-10 16:20:11 +0100 |
commit | aff9a743668575898d5eafe30e8e240e4a53342a (patch) | |
tree | 0fe33338c6c51ae25d85055021a64f75996724a8 /src/shared/cplusplus/AST.cpp | |
parent | 73a4f2977aaf68a46bd46062e41144349feda878 (diff) | |
download | qt-creator-aff9a743668575898d5eafe30e8e240e4a53342a.tar.gz |
Cleanup NewArrayDeclaratorAST
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 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) |