Improve formatting for arrays

refs #10527
This commit is contained in:
Gunnar Beutner 2015-11-04 17:06:33 +01:00
parent 7378964f31
commit fe1c5e9507
1 changed files with 3 additions and 1 deletions

View File

@ -54,7 +54,9 @@ void ConfigWriter::EmitArray(std::ostream& fp, int indentLevel, const Array::Ptr
{ {
fp << "[ "; fp << "[ ";
EmitArrayItems(fp, indentLevel, val); EmitArrayItems(fp, indentLevel, val);
fp << " ]"; if (val->GetLength() > 0)
fp << " ";
fp << "]";
} }
void ConfigWriter::EmitArrayItems(std::ostream& fp, int indentLevel, const Array::Ptr& val) void ConfigWriter::EmitArrayItems(std::ostream& fp, int indentLevel, const Array::Ptr& val)