minor improvements to documentation and style

This commit is contained in:
Guenter Obiltschnig
2017-02-13 22:33:48 +01:00
parent ba6a7900e2
commit bd82bb1306
21 changed files with 392 additions and 322 deletions

View File

@@ -48,7 +48,7 @@ void ParseHandler::startObject()
{
Object::Ptr newObj = new Object(_preserveObjectOrder);
if ( _stack.empty() ) // The first object
if (_stack.empty()) // The first object
{
_result = newObj;
}
@@ -56,12 +56,12 @@ void ParseHandler::startObject()
{
Var parent = _stack.top();
if ( parent.type() == typeid(Array::Ptr) )
if (parent.type() == typeid(Array::Ptr))
{
Array::Ptr arr = parent.extract<Array::Ptr>();
arr->add(newObj);
}
else if ( parent.type() == typeid(Object::Ptr) )
else if (parent.type() == typeid(Object::Ptr))
{
poco_assert_dbg(!_key.empty());
Object::Ptr obj = parent.extract<Object::Ptr>();
@@ -84,7 +84,7 @@ void ParseHandler::startArray()
{
Array::Ptr newArr = new Array();
if ( _stack.empty() ) // The first array
if (_stack.empty()) // The first array
{
_result = newArr;
}
@@ -92,12 +92,12 @@ void ParseHandler::startArray()
{
Var parent = _stack.top();
if ( parent.type() == typeid(Array::Ptr) )
if (parent.type() == typeid(Array::Ptr))
{
Array::Ptr arr = parent.extract<Array::Ptr>();
arr->add(newArr);
}
else if ( parent.type() == typeid(Object::Ptr) )
else if (parent.type() == typeid(Object::Ptr))
{
poco_assert_dbg(!_key.empty());
Object::Ptr obj = parent.extract<Object::Ptr>();
@@ -126,12 +126,12 @@ void ParseHandler::setValue(const Var& value)
{
Var parent = _stack.top();
if ( parent.type() == typeid(Array::Ptr) )
if (parent.type() == typeid(Array::Ptr))
{
Array::Ptr arr = parent.extract<Array::Ptr>();
arr->add(value);
}
else if ( parent.type() == typeid(Object::Ptr) )
else if (parent.type() == typeid(Object::Ptr))
{
Object::Ptr obj = parent.extract<Object::Ptr>();
obj->set(_key, value);