From: Gunnar Beutner Date: Wed, 30 Jan 2013 22:15:37 +0000 (+0100) Subject: Fixed indentation bug in Expression::DumpValue(). X-Git-Tag: v0.0.2~608 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a4451abad338efdfa0d312d03eee01130f2d00af;p=icinga2 Fixed indentation bug in Expression::DumpValue(). --- diff --git a/lib/config/expression.cpp b/lib/config/expression.cpp index a8f74a74e..71a9c8894 100644 --- a/lib/config/expression.cpp +++ b/lib/config/expression.cpp @@ -117,8 +117,6 @@ void Expression::DumpValue(ostream& fp, int indent, const Value& value, bool inl static_cast(value)->Dump(fp, indent); if (!inlineDict) { - fp << "\n"; - for (int i = 0; i < indent - 1; i++) fp << "\t"; @@ -135,13 +133,18 @@ void Expression::DumpValue(ostream& fp, int indent, const Value& value, bool inl String k; Value v; BOOST_FOREACH(tie(k, v), static_cast(value)) { + for (int i = 0; i < indent; i++) + fp << "\t"; + fp << "\"" << k << "\" = "; DumpValue(fp, indent, v); fp << "," << "\n"; + + fp << "}"; } if (!inlineDict) - fp << "\n" << "}"; + fp << "}"; return; }