@@ -218,8 +218,7 @@ void Value::CommentInfo::setComment(const char* text, size_t len) {
218
218
Value::CZString::CZString (ArrayIndex aindex) : cstr_(0 ), index_(aindex) {}
219
219
220
220
Value::CZString::CZString (char const * str, unsigned ulength, DuplicationPolicy allocate)
221
- : cstr_(str)
222
- {
221
+ : cstr_(str) {
223
222
// allocate != duplicate
224
223
storage_.policy_ = allocate & 0x3 ;
225
224
storage_.length_ = ulength & 0x3FFFFFFF ;
@@ -228,8 +227,7 @@ Value::CZString::CZString(char const* str, unsigned ulength, DuplicationPolicy a
228
227
Value::CZString::CZString (const CZString& other)
229
228
: cstr_(other.storage_.policy_ != noDuplication && other.cstr_ != 0
230
229
? duplicateStringValue(other.cstr_, other.storage_.length_)
231
- : other.cstr_)
232
- {
230
+ : other.cstr_) {
233
231
storage_.policy_ = (other.cstr_
234
232
? (static_cast <DuplicationPolicy>(other.storage_ .policy_ ) == noDuplication
235
233
? noDuplication : duplicate)
@@ -239,10 +237,8 @@ Value::CZString::CZString(const CZString& other)
239
237
240
238
#if JSON_HAS_RVALUE_REFERENCES
241
239
Value::CZString::CZString (CZString&& other)
242
- : cstr_(other.cstr_),
243
- index_(other.index_)
244
- {
245
- other.cstr_ = 0 ;
240
+ : cstr_(other.cstr_), index_(other.index_) {
241
+ other.cstr_ = nullptr ;
246
242
}
247
243
#endif
248
244
@@ -436,10 +432,9 @@ Value::Value(Value const& other)
436
432
437
433
#if JSON_HAS_RVALUE_REFERENCES
438
434
// Move constructor
439
- Value::Value (Value&& other)
440
- {
441
- initBasic (nullValue);
442
- swap (other);
435
+ Value::Value (Value&& other) {
436
+ initBasic (nullValue);
437
+ swap (other);
443
438
}
444
439
#endif
445
440
0 commit comments