Minor iterator refactoring

git-svn-id: http://pugixml.googlecode.com/svn/trunk@635 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
arseny.kapoulkine 2010-08-29 15:03:15 +00:00
parent b88cf138f9
commit c779ee05ce

View File

@ -4153,8 +4153,7 @@ namespace pugi
const xml_node_iterator& xml_node_iterator::operator--()
{
if (_wrap._root) _wrap = _wrap.previous_sibling();
else _wrap = _parent.last_child();
_wrap = _wrap._root ? _wrap.previous_sibling() : _parent.last_child();
return *this;
}
@ -4215,8 +4214,7 @@ namespace pugi
const xml_attribute_iterator& xml_attribute_iterator::operator--()
{
if (_wrap._attr) _wrap = _wrap.previous_attribute();
else _wrap = _parent.last_attribute();
_wrap = _wrap._attr ? _wrap.previous_attribute() : _parent.last_attribute();
return *this;
}