From 4f46e59af30fe622ad1e945e3cb94e7e7cc44195 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 26 Aug 2016 08:58:49 +0200 Subject: [PATCH] Implement an rvalue constructor for the String and Value classes fixes #12555 --- lib/base/string.hpp | 4 ++++ lib/base/value.hpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/base/string.hpp b/lib/base/string.hpp index 2ed06b86d..f86b29246 100644 --- a/lib/base/string.hpp +++ b/lib/base/string.hpp @@ -77,6 +77,10 @@ public: : m_Data(other.m_Data) { } + inline String(String&& other) + : m_Data(other) + { } + inline ~String(void) { } diff --git a/lib/base/value.hpp b/lib/base/value.hpp index 3d12a262e..52a03b195 100644 --- a/lib/base/value.hpp +++ b/lib/base/value.hpp @@ -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)