Renamed _originalName to mOriginalName

This commit is contained in:
Daniel Marjamäki 2018-06-16 21:40:25 +02:00
parent 76280fe847
commit 82169b6247
2 changed files with 12 additions and 12 deletions

View File

@ -53,7 +53,7 @@ Token::Token(TokensFrontBack *tokensFrontBack) :
mAstOperand1(nullptr),
mAstOperand2(nullptr),
mAstParent(nullptr),
_originalName(nullptr),
mOriginalName(nullptr),
_valuetype(nullptr),
_values(nullptr)
{
@ -61,7 +61,7 @@ Token::Token(TokensFrontBack *tokensFrontBack) :
Token::~Token()
{
delete _originalName;
delete mOriginalName;
delete _valuetype;
delete _values;
}
@ -259,7 +259,7 @@ void Token::swapWithNext()
std::swap(mLink, mNext->mLink);
std::swap(mScope, mNext->mScope);
std::swap(mFunction, mNext->mFunction);
std::swap(_originalName, mNext->_originalName);
std::swap(mOriginalName, mNext->mOriginalName);
std::swap(_values, mNext->_values);
std::swap(_valuetype, mNext->_valuetype);
std::swap(mProgressValue, mNext->mProgressValue);
@ -277,10 +277,10 @@ void Token::takeData(Token *fromToken)
mLink = fromToken->mLink;
mScope = fromToken->mScope;
mFunction = fromToken->mFunction;
if (fromToken->_originalName) {
delete _originalName;
_originalName = fromToken->_originalName;
fromToken->_originalName = nullptr;
if (fromToken->mOriginalName) {
delete mOriginalName;
mOriginalName = fromToken->mOriginalName;
fromToken->mOriginalName = nullptr;
}
delete _values;
_values = fromToken->_values;

View File

@ -804,7 +804,7 @@ public:
* @return the original name.
*/
const std::string & originalName() const {
return _originalName ? *_originalName : emptyString;
return mOriginalName ? *mOriginalName : emptyString;
}
const std::list<ValueFlow::Value>& values() const {
@ -816,10 +816,10 @@ public:
*/
template<typename T>
void originalName(T&& name) {
if (!_originalName)
_originalName = new std::string(name);
if (!mOriginalName)
mOriginalName = new std::string(name);
else
*_originalName = name;
*mOriginalName = name;
}
bool hasKnownIntValue() const {
@ -994,7 +994,7 @@ private:
Token *mAstParent;
// original name like size_t
std::string* _originalName;
std::string* mOriginalName;
// ValueType
ValueType *_valuetype;