mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-31 06:23:02 +08:00
parent
1ab310e3ed
commit
3e2b8ea9cc
@ -931,7 +931,7 @@ void Value::resize(ArrayIndex newSize) {
|
|||||||
if (newSize == 0)
|
if (newSize == 0)
|
||||||
clear();
|
clear();
|
||||||
else if (newSize > oldSize)
|
else if (newSize > oldSize)
|
||||||
(*this)[newSize - 1];
|
this->operator[](newSize - 1);
|
||||||
else {
|
else {
|
||||||
for (ArrayIndex index = newSize; index < oldSize; ++index) {
|
for (ArrayIndex index = newSize; index < oldSize; ++index) {
|
||||||
value_.map_->erase(index);
|
value_.map_->erase(index);
|
||||||
|
@ -623,7 +623,8 @@ bool StyledWriter::hasCommentForValue(const Value& value) {
|
|||||||
|
|
||||||
StyledStreamWriter::StyledStreamWriter(JSONCPP_STRING indentation)
|
StyledStreamWriter::StyledStreamWriter(JSONCPP_STRING indentation)
|
||||||
: document_(NULL), rightMargin_(74), indentation_(indentation),
|
: document_(NULL), rightMargin_(74), indentation_(indentation),
|
||||||
addChildValues_() {}
|
addChildValues_(), indented_(false)
|
||||||
|
{}
|
||||||
|
|
||||||
void StyledStreamWriter::write(JSONCPP_OSTREAM& out, const Value& root) {
|
void StyledStreamWriter::write(JSONCPP_OSTREAM& out, const Value& root) {
|
||||||
document_ = &out;
|
document_ = &out;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user