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
1 changed files with 2 additions and 4 deletions

View File

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