From 17c244e644c6654d99bd1391bd999c4ab5f5cedc Mon Sep 17 00:00:00 2001 From: renu555 Date: Wed, 2 Jul 2014 09:19:00 +0530 Subject: [PATCH] Fixing unreachable condition. if (!isMultiLine) at line 563 suggests that isMultiline is 0 when if takes true branch. So the condition && at line 571 will always be false. Also at line 568 !isMultiline in loop conditional check suggests that it depends only on one condition i.e. index = rightMargin_; @@ -568,7 +568,7 @@ bool StyledStreamWriter::isMultineArray(const Value &value) { for (int index = 0; index < size && !isMultiLine; ++index) { writeValue(value[index]); lineLength += int(childValues_[index].length()); - isMultiLine = isMultiLine && hasCommentForValue(value[index]); + isMultiLine = isMultiLine || hasCommentForValue(value[index]); } addChildValues_ = false; isMultiLine = isMultiLine || lineLength >= rightMargin_;