@@ -92,26 +92,26 @@ class PrettyWriter : public Writer<OutputStream, SourceEncoding, TargetEncoding,
92
92
*/
93
93
// @{
94
94
95
- bool Null () { PrettyPrefix (kNullType ); return Base::WriteNull (); }
96
- bool Bool (bool b) { PrettyPrefix (b ? kTrueType : kFalseType ); return Base::WriteBool (b); }
97
- bool Int (int i) { PrettyPrefix (kNumberType ); return Base::WriteInt (i); }
98
- bool Uint (unsigned u) { PrettyPrefix (kNumberType ); return Base::WriteUint (u); }
99
- bool Int64 (int64_t i64 ) { PrettyPrefix (kNumberType ); return Base::WriteInt64 (i64 ); }
100
- bool Uint64 (uint64_t u64 ) { PrettyPrefix (kNumberType ); return Base::WriteUint64 (u64 ); }
101
- bool Double (double d) { PrettyPrefix (kNumberType ); return Base::WriteDouble (d); }
95
+ bool Null () { PrettyPrefix (kNullType ); return Base::EndValue ( Base:: WriteNull () ); }
96
+ bool Bool (bool b) { PrettyPrefix (b ? kTrueType : kFalseType ); return Base::EndValue ( Base:: WriteBool (b) ); }
97
+ bool Int (int i) { PrettyPrefix (kNumberType ); return Base::EndValue ( Base:: WriteInt (i) ); }
98
+ bool Uint (unsigned u) { PrettyPrefix (kNumberType ); return Base::EndValue ( Base:: WriteUint (u) ); }
99
+ bool Int64 (int64_t i64 ) { PrettyPrefix (kNumberType ); return Base::EndValue ( Base:: WriteInt64 (i64 ) ); }
100
+ bool Uint64 (uint64_t u64 ) { PrettyPrefix (kNumberType ); return Base::EndValue ( Base:: WriteUint64 (u64 ) ); }
101
+ bool Double (double d) { PrettyPrefix (kNumberType ); return Base::EndValue ( Base:: WriteDouble (d) ); }
102
102
103
103
bool RawNumber (const Ch* str, SizeType length, bool copy = false ) {
104
104
RAPIDJSON_ASSERT (str != 0 );
105
105
(void )copy;
106
106
PrettyPrefix (kNumberType );
107
- return Base::WriteString (str, length);
107
+ return Base::EndValue ( Base:: WriteString (str, length) );
108
108
}
109
109
110
110
bool String (const Ch* str, SizeType length, bool copy = false ) {
111
111
RAPIDJSON_ASSERT (str != 0 );
112
112
(void )copy;
113
113
PrettyPrefix (kStringType );
114
- return Base::WriteString (str, length);
114
+ return Base::EndValue ( Base:: WriteString (str, length) );
115
115
}
116
116
117
117
#if RAPIDJSON_HAS_STDSTRING
@@ -146,7 +146,7 @@ class PrettyWriter : public Writer<OutputStream, SourceEncoding, TargetEncoding,
146
146
Base::os_->Put (' \n ' );
147
147
WriteIndent ();
148
148
}
149
- bool ret = Base::WriteEndObject ();
149
+ bool ret = Base::EndValue ( Base:: WriteEndObject () );
150
150
(void )ret;
151
151
RAPIDJSON_ASSERT (ret == true );
152
152
if (Base::level_stack_.Empty ()) // end of json text
@@ -170,7 +170,7 @@ class PrettyWriter : public Writer<OutputStream, SourceEncoding, TargetEncoding,
170
170
Base::os_->Put (' \n ' );
171
171
WriteIndent ();
172
172
}
173
- bool ret = Base::WriteEndArray ();
173
+ bool ret = Base::EndValue ( Base:: WriteEndArray () );
174
174
(void )ret;
175
175
RAPIDJSON_ASSERT (ret == true );
176
176
if (Base::level_stack_.Empty ()) // end of json text
@@ -201,7 +201,7 @@ class PrettyWriter : public Writer<OutputStream, SourceEncoding, TargetEncoding,
201
201
bool RawValue (const Ch* json, size_t length, Type type) {
202
202
RAPIDJSON_ASSERT (json != 0 );
203
203
PrettyPrefix (type);
204
- return Base::WriteRawValue (json, length);
204
+ return Base::EndValue ( Base:: WriteRawValue (json, length) );
205
205
}
206
206
207
207
protected:
0 commit comments