From 363f4ca939db63acbe35148098d39dac525e52b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 16 Jun 2018 16:14:34 +0200 Subject: [PATCH] rename _flags to mFlags --- lib/symboldatabase.cpp | 2 +- lib/symboldatabase.h | 8 ++++---- lib/token.cpp | 6 +++--- lib/token.h | 10 +++++----- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/symboldatabase.cpp b/lib/symboldatabase.cpp index ecb4a50ee..5e5c2b64b 100644 --- a/lib/symboldatabase.cpp +++ b/lib/symboldatabase.cpp @@ -2633,7 +2633,7 @@ void SymbolDatabase::printVariable(const Variable *var, const char *indent) cons var->isLocal() ? "Local" : var->isThrow() ? "Throw" : "Unknown") << std::endl; - std::cout << indent << "_flags: " << std::endl; + std::cout << indent << "mFlags: " << std::endl; std::cout << indent << " isMutable: " << var->isMutable() << std::endl; std::cout << indent << " isStatic: " << var->isStatic() << std::endl; std::cout << indent << " isExtern: " << var->isExtern() << std::endl; diff --git a/lib/symboldatabase.h b/lib/symboldatabase.h index f37b38d49..1d3020395 100644 --- a/lib/symboldatabase.h +++ b/lib/symboldatabase.h @@ -199,7 +199,7 @@ class CPPCHECKLIB Variable { * @return true if flag set or false in flag not set */ bool getFlag(unsigned int flag_) const { - return ((_flags & flag_) != 0); + return ((mFlags & flag_) != 0); } /** @@ -208,7 +208,7 @@ class CPPCHECKLIB Variable { * @param state_ new state of flag */ void setFlag(unsigned int flag_, bool state_) { - _flags = state_ ? _flags | flag_ : _flags & ~flag_; + mFlags = state_ ? mFlags | flag_ : mFlags & ~flag_; } /** @@ -227,7 +227,7 @@ public: mTypeEndToken(end_), mIndex(index_), mAccess(access_), - _flags(0), + mFlags(0), mConstness(0), _type(type_), _scope(scope_) { @@ -631,7 +631,7 @@ private: AccessControl mAccess; // public/protected/private /** @brief flags */ - unsigned int _flags; + unsigned int mFlags; /** @brief constness (same encoding as ValueType::constness) */ unsigned int mConstness; diff --git a/lib/token.cpp b/lib/token.cpp index 55175ba68..3efac667f 100644 --- a/lib/token.cpp +++ b/lib/token.cpp @@ -48,7 +48,7 @@ Token::Token(TokensFrontBack *tokensFrontBack) : _col(0), _progressValue(0), _tokType(eNone), - _flags(0), + mFlags(0), _bits(0), _astOperand1(nullptr), _astOperand2(nullptr), @@ -248,7 +248,7 @@ void Token::swapWithNext() if (_next) { std::swap(_str, _next->_str); std::swap(_tokType, _next->_tokType); - std::swap(_flags, _next->_flags); + std::swap(mFlags, _next->mFlags); std::swap(_varId, _next->_varId); std::swap(_fileIndex, _next->_fileIndex); std::swap(_linenr, _next->_linenr); @@ -270,7 +270,7 @@ void Token::takeData(Token *fromToken) { _str = fromToken->_str; tokType(fromToken->_tokType); - _flags = fromToken->_flags; + mFlags = fromToken->mFlags; _varId = fromToken->_varId; _fileIndex = fromToken->_fileIndex; _linenr = fromToken->_linenr; diff --git a/lib/token.h b/lib/token.h index 4a6db96fe..9359380e1 100644 --- a/lib/token.h +++ b/lib/token.h @@ -312,10 +312,10 @@ public: bool isUnaryPreOp() const; unsigned int flags() const { - return _flags; + return mFlags; } void flags(const unsigned int flags_) { - _flags = flags_; + mFlags = flags_; } bool isUnsigned() const { return getFlag(fIsUnsigned); @@ -958,7 +958,7 @@ private: fIsAttributeNodiscard = (1 << 23), // __attribute__ ((warn_unused_result)), [[nodiscard]] }; - unsigned int _flags; + unsigned int mFlags; /** * Get specified flag state. @@ -966,7 +966,7 @@ private: * @return true if flag set or false in flag not set */ bool getFlag(unsigned int flag_) const { - return ((_flags & flag_) != 0); + return ((mFlags & flag_) != 0); } /** @@ -975,7 +975,7 @@ private: * @param state_ new state of flag */ void setFlag(unsigned int flag_, bool state_) { - _flags = state_ ? _flags | flag_ : _flags & ~flag_; + mFlags = state_ ? mFlags | flag_ : mFlags & ~flag_; } /** Updates internal property cache like _isName or _isBoolean.