diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2009-11-10 14:33:51 +0100 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2009-11-10 16:20:12 +0100 |
commit | 24b6c858ebc3a16e9a82c0ea6e8fc6743f0e3229 (patch) | |
tree | cf837fd4dfbf50cdc00ac9c6e3b8ff6b86649cef /src/shared/cplusplus/AST.cpp | |
parent | a7219736b6081888a35aa5f58fcec4abc8dfad44 (diff) | |
download | qt-creator-24b6c858ebc3a16e9a82c0ea6e8fc6743f0e3229.tar.gz |
Cleanup postfix declarators.
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 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(); |