Token::takeData: dont keep old values or valuetype

This commit is contained in:
Daniel Marjamäki 2017-08-25 23:32:26 +02:00
parent ea0db18e0c
commit 46c6620691
1 changed files with 6 additions and 10 deletions

View File

@ -245,16 +245,12 @@ void Token::takeData(Token *fromToken)
_originalName = fromToken->_originalName;
fromToken->_originalName = nullptr;
}
if (fromToken->_values) {
delete _values;
_values = fromToken->_values;
fromToken->_values = nullptr;
}
if (fromToken->valuetype) {
delete valuetype;
valuetype = fromToken->valuetype;
fromToken->valuetype = nullptr;
}
delete _values;
_values = fromToken->_values;
fromToken->_values = nullptr;
delete valuetype;
valuetype = fromToken->valuetype;
fromToken->valuetype = nullptr;
if (_link)
_link->link(this);
}