Merge pull request #365 from ya1gaurav/patch-29

Remove conditional check for isMultiLine
This commit is contained in:
Christopher Dunn 2015-09-22 05:08:56 -05:00
commit 9942f6a1c7

View File

@ -489,8 +489,7 @@ bool StyledWriter::isMultineArray(const Value& value) {
childValues_.clear(); childValues_.clear();
for (int index = 0; index < size && !isMultiLine; ++index) { for (int index = 0; index < size && !isMultiLine; ++index) {
const Value& childValue = value[index]; const Value& childValue = value[index];
isMultiLine = isMultiLine = ((childValue.isArray() || childValue.isObject()) &&
isMultiLine || ((childValue.isArray() || childValue.isObject()) &&
childValue.size() > 0); childValue.size() > 0);
} }
if (!isMultiLine) // check if line length > max line length if (!isMultiLine) // check if line length > max line length
@ -709,8 +708,7 @@ bool StyledStreamWriter::isMultineArray(const Value& value) {
childValues_.clear(); childValues_.clear();
for (int index = 0; index < size && !isMultiLine; ++index) { for (int index = 0; index < size && !isMultiLine; ++index) {
const Value& childValue = value[index]; const Value& childValue = value[index];
isMultiLine = isMultiLine = ((childValue.isArray() || childValue.isObject()) &&
isMultiLine || ((childValue.isArray() || childValue.isObject()) &&
childValue.size() > 0); childValue.size() > 0);
} }
if (!isMultiLine) // check if line length > max line length if (!isMultiLine) // check if line length > max line length
@ -989,8 +987,7 @@ bool BuiltStyledStreamWriter::isMultineArray(Value const& value) {
childValues_.clear(); childValues_.clear();
for (int index = 0; index < size && !isMultiLine; ++index) { for (int index = 0; index < size && !isMultiLine; ++index) {
Value const& childValue = value[index]; Value const& childValue = value[index];
isMultiLine = isMultiLine = ((childValue.isArray() || childValue.isObject()) &&
isMultiLine || ((childValue.isArray() || childValue.isObject()) &&
childValue.size() > 0); childValue.size() > 0);
} }
if (!isMultiLine) // check if line length > max line length if (!isMultiLine) // check if line length > max line length