diff options
| author | Roberto Raggi <roberto.raggi@nokia.com> | 2010-08-05 17:02:25 +0200 |
|---|---|---|
| committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-08-05 17:53:14 +0200 |
| commit | 9aa991d6368f011e215a482c60add86f7f6277a2 (patch) | |
| tree | 87242f692241f1d5bca27c60ee16fa8937f080c3 /src/shared/cplusplus/Scope.cpp | |
| parent | 5f440364241f0d1caa00926097ea3a535526e8b0 (diff) | |
| download | qt-creator-9aa991d6368f011e215a482c60add86f7f6277a2.tar.gz | |
Refactored CPlusPlus::Function.
Diffstat (limited to 'src/shared/cplusplus/Scope.cpp')
| -rw-r--r-- | src/shared/cplusplus/Scope.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/shared/cplusplus/Scope.cpp b/src/shared/cplusplus/Scope.cpp index de0f147eb3..2b6b141856 100644 --- a/src/shared/cplusplus/Scope.cpp +++ b/src/shared/cplusplus/Scope.cpp @@ -58,9 +58,9 @@ using namespace CPlusPlus; Scope::Scope(ScopedSymbol *owner) : _owner(owner), _symbols(0), + _hash(0), _allocatedSymbols(0), _symbolCount(-1), - _hash(0), _hashSize(0), _startOffset(0), _endOffset(0) @@ -168,10 +168,7 @@ bool Scope::isBlockScope() const bool Scope::isPrototypeScope() const { - Function *f = 0; - if (_owner && 0 != (f = _owner->asFunction())) - return f->arguments() == this; - return false; + return isFunctionScope(); } bool Scope::isObjCClassScope() const @@ -190,9 +187,8 @@ bool Scope::isObjCProtocolScope() const bool Scope::isFunctionScope() const { - Function *f = 0; - if (_owner && 0 != (f = _owner->asFunction())) - return f->arguments() != this; + if (_owner) + return _owner->isFunction(); return false; } |
