Fix move assignment operator for the String class

fixes #12619
This commit is contained in:
Gunnar Beutner 2016-09-01 15:25:14 +02:00
parent 7879c09789
commit b5d4d9aba3

View File

@ -38,10 +38,8 @@ String::String(Value&& other)
String& String::operator=(Value&& other) String& String::operator=(Value&& other)
{ {
const String *p = other.GetPtr<String>(); if (other.IsString())
m_Data = std::move(other.Get<String>());
if (p)
m_Data = std::move(p->m_Data);
else else
m_Data = other; m_Data = other;