From f2b4c3d64730dc019ccebca7b5eb44d8a5b3a2a9 Mon Sep 17 00:00:00 2001 From: halx99 Date: Tue, 6 Jul 2021 01:44:02 +0800 Subject: [PATCH] Fix CCValue move assignment with std::string --- cocos/base/CCValue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/base/CCValue.cpp b/cocos/base/CCValue.cpp index b73c18ffd8..c5728ad497 100644 --- a/cocos/base/CCValue.cpp +++ b/cocos/base/CCValue.cpp @@ -93,7 +93,7 @@ Value::Value(const std::string& v) _field.strVal = new (std::nothrow) std::string(v); } -Value::Value(std::string&& v) { +Value::Value(std::string&& v) : _type(Type::STRING) { _field.strVal = new (std::nothrow) std::string(std::move(v)); }