From a4581c7c3ab44b2fee82e71c1b0d2c3daaef51d6 Mon Sep 17 00:00:00 2001 From: MenTaLguY Date: Tue, 1 Jul 2008 23:08:09 +0000 Subject: remove "public private" virtual methods from XML::Node (bzr r6110) --- src/xml/simple-node.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/xml/simple-node.cpp') diff --git a/src/xml/simple-node.cpp b/src/xml/simple-node.cpp index 3d82eed01..a229c33fe 100644 --- a/src/xml/simple-node.cpp +++ b/src/xml/simple-node.cpp @@ -240,18 +240,18 @@ unsigned SimpleNode::position() const { return _parent->_childPosition(*this); } -unsigned SimpleNode::_childPosition(Node const &child) const { +unsigned SimpleNode::_childPosition(SimpleNode const &child) const { if (!_cached_positions_valid) { unsigned position=0; for ( SimpleNode *sibling = _first_child ; sibling ; sibling = sibling->_next ) { - sibling->_setCachedPosition(position); + sibling->_cached_position = position; position++; } _cached_positions_valid = true; } - return child._cachedPosition(); + return child._cached_position; } Node *SimpleNode::nthChild(unsigned index) { @@ -277,10 +277,9 @@ bool SimpleNode::matchAttributeName(gchar const *partial_name) const { return false; } -void SimpleNode::_setParent(Node *generic_parent) { - SimpleNode *parent = dynamic_cast(generic_parent); +void SimpleNode::_setParent(SimpleNode *parent) { if (_parent) { - _subtree_observers.remove(dynamic_cast(_parent)->_subtree_observers); + _subtree_observers.remove(_parent->_subtree_observers); } _parent = parent; if (parent) { -- cgit v1.2.3