@@ -218,8 +218,7 @@ void Value::CommentInfo::setComment(const char* text, size_t len) {
218218Value::CZString::CZString (ArrayIndex aindex) : cstr_(0 ), index_(aindex) {}
219219
220220Value::CZString::CZString (char const * str, unsigned ulength, DuplicationPolicy allocate)
221- : cstr_(str)
222- {
221+ : cstr_(str) {
223222 // allocate != duplicate
224223 storage_.policy_ = allocate & 0x3 ;
225224 storage_.length_ = ulength & 0x3FFFFFFF ;
@@ -228,8 +227,7 @@ Value::CZString::CZString(char const* str, unsigned ulength, DuplicationPolicy a
228227Value::CZString::CZString (const CZString& other)
229228 : cstr_(other.storage_.policy_ != noDuplication && other.cstr_ != 0
230229 ? duplicateStringValue(other.cstr_, other.storage_.length_)
231- : other.cstr_)
232- {
230+ : other.cstr_) {
233231 storage_.policy_ = (other.cstr_
234232 ? (static_cast <DuplicationPolicy>(other.storage_ .policy_ ) == noDuplication
235233 ? noDuplication : duplicate)
@@ -239,10 +237,8 @@ Value::CZString::CZString(const CZString& other)
239237
240238#if JSON_HAS_RVALUE_REFERENCES
241239Value::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 ;
246242}
247243#endif
248244
@@ -436,10 +432,9 @@ Value::Value(Value const& other)
436432
437433#if JSON_HAS_RVALUE_REFERENCES
438434// 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);
443438}
444439#endif
445440
0 commit comments