mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-18 11:38:59 +02:00
Fix non-rvalue Json::Value assignment operator (should copy, not move)
This commit is contained in:
@@ -518,18 +518,10 @@ Value::~Value() {
|
||||
value_.uint_ = 0;
|
||||
}
|
||||
|
||||
Value& Value::operator=(const Value& other) {
|
||||
swap(const_cast<Value&>(other));
|
||||
return *this;
|
||||
}
|
||||
|
||||
#if JSON_HAS_RVALUE_REFERENCES
|
||||
Value& Value::operator=(Value&& other) {
|
||||
initBasic(nullValue);
|
||||
Value& Value::operator=(Value other) {
|
||||
swap(other);
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
||||
void Value::swapPayload(Value& other) {
|
||||
ValueType temp = type_;
|
||||
|
Reference in New Issue
Block a user