mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-05-21 12:23:30 +02:00
Merge pull request #1 from cdunn2001/patch-renu555
dead-code patch by renu555
This commit is contained in:
commit
973de3988b
@ -341,10 +341,9 @@ bool StyledWriter::isMultineArray(const Value &value) {
|
||||
childValues_.reserve(size);
|
||||
addChildValues_ = true;
|
||||
int lineLength = 4 + (size - 1) * 2; // '[ ' + ', '*n + ' ]'
|
||||
for (int index = 0; index < size && !isMultiLine; ++index) {
|
||||
for (int index = 0; index < size; ++index) {
|
||||
writeValue(value[index]);
|
||||
lineLength += int(childValues_[index].length());
|
||||
isMultiLine = isMultiLine && hasCommentForValue(value[index]);
|
||||
}
|
||||
addChildValues_ = false;
|
||||
isMultiLine = isMultiLine || lineLength >= rightMargin_;
|
||||
@ -565,10 +564,9 @@ bool StyledStreamWriter::isMultineArray(const Value &value) {
|
||||
childValues_.reserve(size);
|
||||
addChildValues_ = true;
|
||||
int lineLength = 4 + (size - 1) * 2; // '[ ' + ', '*n + ' ]'
|
||||
for (int index = 0; index < size && !isMultiLine; ++index) {
|
||||
for (int index = 0; index < size; ++index) {
|
||||
writeValue(value[index]);
|
||||
lineLength += int(childValues_[index].length());
|
||||
isMultiLine = isMultiLine && hasCommentForValue(value[index]);
|
||||
}
|
||||
addChildValues_ = false;
|
||||
isMultiLine = isMultiLine || lineLength >= rightMargin_;
|
||||
|
Loading…
x
Reference in New Issue
Block a user