Correct indentation

This commit is contained in:
fbraem
2013-03-01 21:59:50 +01:00
parent 39fc777a6b
commit e793083a0a

View File

@@ -150,7 +150,13 @@ void Document::read(BinaryReader& reader)
std::string Document::toString(int indent) const std::string Document::toString(int indent) const
{ {
std::ostringstream oss; std::ostringstream oss;
oss << "{" << std::endl;
oss << "{";
if ( indent > 0 )
{
oss << std::endl;
}
for(ElementSet::const_iterator it = _elements.begin(); it != _elements.end(); ++it) for(ElementSet::const_iterator it = _elements.begin(); it != _elements.end(); ++it)
{ {
if ( it != _elements.begin() ) if ( it != _elements.begin() )
@@ -189,7 +195,8 @@ std::string Document::toString(int indent) const
} }
} }
oss << "}" << std::endl; oss << "}";
return oss.str(); return oss.str();
} }