From e8a00a38acdd2506507419610f27f90e133d05ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 16 Jun 2018 20:29:17 +0200 Subject: [PATCH] Rename _scope to mScope --- lib/symboldatabase.cpp | 4 ++-- lib/symboldatabase.h | 6 +++--- lib/token.cpp | 6 +++--- lib/token.h | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index 74fa015dc..d597a7692 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -1692,7 +1692,7 @@ void Variable::evaluate(const Library* lib) setFlag(fHasDefault, tok->str() == "="); } // check for C++11 member initialization - if (_scope && _scope->isClassOrStruct()) { + if (mScope && mScope->isClassOrStruct()) { // type var = x or // type var = {x} // type var = x; gets simplified to: type var ; var = x ; @@ -2662,7 +2662,7 @@ void SymbolDatabase::printVariable(const Variable *var, const char *indent) cons } } - std::cout << indent << "_scope: " << scopeToString(var->scope(), mTokenizer) << std::endl; + std::cout << indent << "mScope: " << scopeToString(var->scope(), mTokenizer) << std::endl; std::cout << indent << "mDimensions:"; for (std::size_t i = 0; i < var->dimensions().size(); i++) { diff --git a/lib/symboldatabase.h b/lib/symboldatabase.h index 81624d4ae..6bf68f714 100644 --- a/lib/symboldatabase.h +++ b/lib/symboldatabase.h @@ -230,7 +230,7 @@ public: mFlags(0), mConstness(0), mType(type_), - _scope(scope_) { + mScope(scope_) { evaluate(lib); } @@ -502,7 +502,7 @@ public: * @return pointer to enclosing scope */ const Scope *scope() const { - return _scope; + return mScope; } /** @@ -640,7 +640,7 @@ private: const Type *mType; /** @brief pointer to scope this variable is in */ - const Scope *_scope; + const Scope *mScope; /** @brief array dimensions */ std::vector mDimensions; diff --git a/lib/token.cpp b/lib/token.cpp index 6fa0026f8..6052536d5 100644 --- a/lib/token.cpp +++ b/lib/token.cpp @@ -40,7 +40,7 @@ Token::Token(TokensFrontBack *tokensFrontBack) : mNext(nullptr), mPrevious(nullptr), _link(nullptr), - _scope(nullptr), + mScope(nullptr), mFunction(nullptr), // Initialize whole union mVarId(0), mFileIndex(0), @@ -257,7 +257,7 @@ void Token::swapWithNext() if (this->_link) this->_link->_link = mNext; std::swap(_link, mNext->_link); - std::swap(_scope, mNext->_scope); + std::swap(mScope, mNext->mScope); std::swap(mFunction, mNext->mFunction); std::swap(_originalName, mNext->_originalName); std::swap(_values, mNext->_values); @@ -275,7 +275,7 @@ void Token::takeData(Token *fromToken) mFileIndex = fromToken->mFileIndex; mLineNumber = fromToken->mLineNumber; _link = fromToken->_link; - _scope = fromToken->_scope; + mScope = fromToken->mScope; mFunction = fromToken->mFunction; if (fromToken->_originalName) { delete _originalName; diff --git a/lib/token.h b/lib/token.h index 6294d0de4..294279b97 100644 --- a/lib/token.h +++ b/lib/token.h @@ -661,14 +661,14 @@ public: * @param s Scope to be associated */ void scope(const Scope *s) { - _scope = s; + mScope = s; } /** * @return a pointer to the scope containing this token. */ const Scope *scope() const { - return _scope; + return mScope; } /** @@ -910,7 +910,7 @@ private: Token *_link; // symbol database information - const Scope *_scope; + const Scope *mScope; union { const Function *mFunction; const Variable *mVariable;