Implement an rvalue constructor for the String and Value classes
authorGunnar Beutner <gunnar.beutner@netways.de>
Fri, 26 Aug 2016 06:58:49 +0000 (08:58 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Fri, 26 Aug 2016 07:11:36 +0000 (09:11 +0200)
fixes #12555

lib/base/string.hpp
lib/base/value.hpp

index 2ed06b86d381343527a2af53f0c6e6087d4becdb..f86b29246ccc4b5b54331b416177501922832b6a 100644 (file)
@@ -77,6 +77,10 @@ public:
                : m_Data(other.m_Data)
        { }
 
+       inline String(String&& other)
+               : m_Data(other)
+       { }
+
        inline ~String(void)
        { }
 
index 3d12a262eda987c48774ac16a62f5bc6daa8117a..52a03b1950b82024471187896864411e96c40506 100644 (file)
@@ -99,6 +99,10 @@ public:
                : m_Value(other.m_Value)
        { }
 
+       inline Value(Value&& other)
+               : m_Value(other.m_Value)
+       { }
+
        inline Value(Object *value)
        {
                if (!value)