mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 18:42:41 +01:00
MongoDB: fixes for style and consistency
This commit is contained in:
@@ -7,8 +7,6 @@
|
||||
// Package: MongoDB
|
||||
// Module: Array
|
||||
//
|
||||
// Implementation of the Array class.
|
||||
//
|
||||
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH.
|
||||
// and Contributors.
|
||||
//
|
||||
@@ -24,7 +22,8 @@ namespace Poco {
|
||||
namespace MongoDB {
|
||||
|
||||
|
||||
Array::Array() : Document()
|
||||
Array::Array():
|
||||
Document()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -47,26 +46,26 @@ std::string Array::toString(int indent) const
|
||||
|
||||
oss << "[";
|
||||
|
||||
if ( indent > 0 ) oss << std::endl;
|
||||
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())
|
||||
{
|
||||
oss << ",";
|
||||
if ( indent > 0 ) oss << std::endl;
|
||||
if (indent > 0) oss << std::endl;
|
||||
}
|
||||
|
||||
for(int i = 0; i < indent; ++i) oss << ' ';
|
||||
for (int i = 0; i < indent; ++i) oss << ' ';
|
||||
|
||||
oss << (*it)->toString(indent > 0 ? indent + 2 : 0);
|
||||
}
|
||||
|
||||
if ( indent > 0 )
|
||||
if (indent > 0)
|
||||
{
|
||||
oss << std::endl;
|
||||
if ( indent >= 2 ) indent -= 2;
|
||||
for(int i = 0; i < indent; ++i) oss << ' ';
|
||||
if (indent >= 2) indent -= 2;
|
||||
for (int i = 0; i < indent; ++i) oss << ' ';
|
||||
}
|
||||
|
||||
oss << "]";
|
||||
@@ -75,4 +74,4 @@ std::string Array::toString(int indent) const
|
||||
}
|
||||
|
||||
|
||||
}} // Namespace Poco::Mongo
|
||||
} } // Namespace Poco::Mongo
|
||||
|
||||
Reference in New Issue
Block a user