diff options
author | hjk <hjk@qt.io> | 2022-06-24 16:37:14 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2022-06-28 11:02:06 +0000 |
commit | 27d51e9804f795876129700863e94096f6bc7839 (patch) | |
tree | ef021c2b7fcab1d928359439973d862ce10ab041 /src/libs/3rdparty/cplusplus/Scope.h | |
parent | 6b32f58225fbb276293effb52bf02e71b7bc411d (diff) |
CPlusPlus: Inline some Scope related simple functions
Change-Id: I23486fdfa749fe864c04d5c1a7cede21fb16005b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/libs/3rdparty/cplusplus/Scope.h')
-rw-r--r-- | src/libs/3rdparty/cplusplus/Scope.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/libs/3rdparty/cplusplus/Scope.h b/src/libs/3rdparty/cplusplus/Scope.h index 94f6dce151..8266e4c6fe 100644 --- a/src/libs/3rdparty/cplusplus/Scope.h +++ b/src/libs/3rdparty/cplusplus/Scope.h @@ -26,7 +26,7 @@ namespace CPlusPlus { -class CPLUSPLUS_EXPORT Scope: public Symbol +class CPLUSPLUS_EXPORT Scope : public Symbol { public: Scope(TranslationUnit *translationUnit, int sourceLocation, const Name *name); @@ -58,18 +58,17 @@ public: Symbol *find(const ConversionNameId *conv) const; /// Set the start offset of the scope - int startOffset() const; - void setStartOffset(int offset); + int startOffset() const { return _startOffset; } + /// Set the start offset of the scope + void setStartOffset(int offset) { _startOffset = offset; } /// Set the end offset of the scope - int endOffset() const; - void setEndOffset(int offset); - - const Scope *asScope() const override - { return this; } + int endOffset() const { return _endOffset; } + /// Set the end offset of the scope + void setEndOffset(int offset) { _endOffset = offset; } - Scope *asScope() override - { return this; } + const Scope *asScope() const override { return this; } + Scope *asScope() override { return this; } private: SymbolTable *_members; |