Skip to content

Commit 9942f6a

Browse files
committed
Merge pull request open-source-parsers#365 from ya1gaurav/patch-29
Remove conditional check for isMultiLine
2 parents cc5cdb5 + 6ee0bff commit 9942f6a

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/lib_json/json_writer.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,7 @@ bool StyledWriter::isMultineArray(const Value& value) {
489489
childValues_.clear();
490490
for (int index = 0; index < size && !isMultiLine; ++index) {
491491
const Value& childValue = value[index];
492-
isMultiLine =
493-
isMultiLine || ((childValue.isArray() || childValue.isObject()) &&
492+
isMultiLine = ((childValue.isArray() || childValue.isObject()) &&
494493
childValue.size() > 0);
495494
}
496495
if (!isMultiLine) // check if line length > max line length
@@ -709,8 +708,7 @@ bool StyledStreamWriter::isMultineArray(const Value& value) {
709708
childValues_.clear();
710709
for (int index = 0; index < size && !isMultiLine; ++index) {
711710
const Value& childValue = value[index];
712-
isMultiLine =
713-
isMultiLine || ((childValue.isArray() || childValue.isObject()) &&
711+
isMultiLine = ((childValue.isArray() || childValue.isObject()) &&
714712
childValue.size() > 0);
715713
}
716714
if (!isMultiLine) // check if line length > max line length
@@ -989,8 +987,7 @@ bool BuiltStyledStreamWriter::isMultineArray(Value const& value) {
989987
childValues_.clear();
990988
for (int index = 0; index < size && !isMultiLine; ++index) {
991989
Value const& childValue = value[index];
992-
isMultiLine =
993-
isMultiLine || ((childValue.isArray() || childValue.isObject()) &&
990+
isMultiLine = ((childValue.isArray() || childValue.isObject()) &&
994991
childValue.size() > 0);
995992
}
996993
if (!isMultiLine) // check if line length > max line length

0 commit comments

Comments
 (0)