Token::takeData: dont keep old values or valuetype
This commit is contained in:
parent
ea0db18e0c
commit
46c6620691
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue