File tree 2 files changed +2
-13
lines changed 2 files changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -327,10 +327,7 @@ Json::Value obj_value(Json::objectValue); // {}
327
327
328
328
// / Deep copy, then swap(other).
329
329
// / \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);
334
331
335
332
// / Swap everything.
336
333
void swap (Value& other);
Original file line number Diff line number Diff line change @@ -518,18 +518,10 @@ Value::~Value() {
518
518
value_.uint_ = 0 ;
519
519
}
520
520
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) {
529
522
swap (other);
530
523
return *this ;
531
524
}
532
- #endif
533
525
534
526
void Value::swapPayload (Value& other) {
535
527
ValueType temp = type_;
You can’t perform that action at this time.
0 commit comments