diff options
| author | MenTaLguY <mental@rydia.net> | 2008-07-01 23:08:09 +0000 |
|---|---|---|
| committer | mental <mental@users.sourceforge.net> | 2008-07-01 23:08:09 +0000 |
| commit | a4581c7c3ab44b2fee82e71c1b0d2c3daaef51d6 (patch) | |
| tree | e8ab52400a3dd17de07b8717edf95660caf030df /src/xml/simple-node.cpp | |
| parent | remove additional unnecessary indirection in tree operations (diff) | |
| download | inkscape-a4581c7c3ab44b2fee82e71c1b0d2c3daaef51d6.tar.gz inkscape-a4581c7c3ab44b2fee82e71c1b0d2c3daaef51d6.zip | |
remove "public private" virtual methods from XML::Node
(bzr r6110)
Diffstat (limited to 'src/xml/simple-node.cpp')
| -rw-r--r-- | src/xml/simple-node.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
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<SimpleNode *>(generic_parent); +void SimpleNode::_setParent(SimpleNode *parent) { if (_parent) { - _subtree_observers.remove(dynamic_cast<SimpleNode *>(_parent)->_subtree_observers); + _subtree_observers.remove(_parent->_subtree_observers); } _parent = parent; if (parent) { |
