implemented move constructor for `TemplateSimplifier::TokenAndName` (#4390)
This commit is contained in:
parent
d351a97a0f
commit
670b872f30
|
@ -234,6 +234,14 @@ TemplateSimplifier::TokenAndName::TokenAndName(const TokenAndName& other) :
|
||||||
mToken->templateSimplifierPointer(this);
|
mToken->templateSimplifierPointer(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TemplateSimplifier::TokenAndName::TokenAndName(TokenAndName&& other) :
|
||||||
|
mToken(other.mToken), mScope(std::move(other.mScope)), mName(std::move(other.mName)), mFullName(std::move(other.mFullName)),
|
||||||
|
mNameToken(other.mNameToken), mParamEnd(other.mParamEnd), mFlags(other.mFlags)
|
||||||
|
{
|
||||||
|
if (mToken)
|
||||||
|
mToken->templateSimplifierPointer(this);
|
||||||
|
}
|
||||||
|
|
||||||
TemplateSimplifier::TokenAndName::~TokenAndName()
|
TemplateSimplifier::TokenAndName::~TokenAndName()
|
||||||
{
|
{
|
||||||
if (mToken && mToken->templateSimplifierPointers())
|
if (mToken && mToken->templateSimplifierPointers())
|
||||||
|
|
|
@ -148,6 +148,7 @@ public:
|
||||||
*/
|
*/
|
||||||
TokenAndName(Token *token, std::string scope, const Token *nameToken, const Token *paramEnd);
|
TokenAndName(Token *token, std::string scope, const Token *nameToken, const Token *paramEnd);
|
||||||
TokenAndName(const TokenAndName& other);
|
TokenAndName(const TokenAndName& other);
|
||||||
|
TokenAndName(TokenAndName&& other);
|
||||||
~TokenAndName();
|
~TokenAndName();
|
||||||
|
|
||||||
bool operator == (const TokenAndName & rhs) const {
|
bool operator == (const TokenAndName & rhs) const {
|
||||||
|
|
Loading…
Reference in New Issue