From fe1c5e9507655a227452daaf2081126883429d50 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Wed, 4 Nov 2015 17:06:33 +0100 Subject: [PATCH] Improve formatting for arrays refs #10527 --- lib/base/configwriter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/base/configwriter.cpp b/lib/base/configwriter.cpp index 737305eac..eac3ca7b9 100644 --- a/lib/base/configwriter.cpp +++ b/lib/base/configwriter.cpp @@ -54,7 +54,9 @@ void ConfigWriter::EmitArray(std::ostream& fp, int indentLevel, const Array::Ptr { fp << "[ "; EmitArrayItems(fp, indentLevel, val); - fp << " ]"; + if (val->GetLength() > 0) + fp << " "; + fp << "]"; } void ConfigWriter::EmitArrayItems(std::ostream& fp, int indentLevel, const Array::Ptr& val) -- 2.40.0