Rename _scope to mScope

This commit is contained in:
Daniel Marjamäki 2018-06-16 20:29:17 +02:00
parent 7314fc7557
commit e8a00a38ac
4 changed files with 11 additions and 11 deletions

View File

@ -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++) {

View File

@ -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<Dimension> mDimensions;

View File

@ -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;

View File

@ -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;