File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -327,10 +327,7 @@ Json::Value obj_value(Json::objectValue); // {}
327327
328328 // / Deep copy, then swap(other).
329329 // / \note Over-write existing comments. To preserve comments, use #swapPayload().
330- Value& operator =(const Value& other);
331- #if JSON_HAS_RVALUE_REFERENCES
332- Value& operator =(Value&& other);
333- #endif
330+ Value& operator =(Value other);
334331
335332 // / Swap everything.
336333 void swap (Value& other);
Original file line number Diff line number Diff line change @@ -518,18 +518,10 @@ Value::~Value() {
518518 value_.uint_ = 0 ;
519519}
520520
521- Value& Value::operator =(const Value& other) {
522- swap (const_cast <Value&>(other));
523- return *this ;
524- }
525-
526- #if JSON_HAS_RVALUE_REFERENCES
527- Value& Value::operator =(Value&& other) {
528- initBasic (nullValue);
521+ Value& Value::operator =(Value other) {
529522 swap (other);
530523 return *this ;
531524}
532- #endif
533525
534526void Value::swapPayload (Value& other) {
535527 ValueType temp = type_;
You can’t perform that action at this time.
0 commit comments