From 5063f31f609ad9c89e7b6d0667c39bc4fad35c27 Mon Sep 17 00:00:00 2001 From: MenTaLguY Date: Tue, 20 Mar 2007 22:54:29 +0000 Subject: plumb XML::Document parameter into duplication, courtesy of bryce (bzr r2723) --- src/xml/simple-node.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/xml/simple-node.cpp') diff --git a/src/xml/simple-node.cpp b/src/xml/simple-node.cpp index f439243cd..c8b0828c4 100644 --- a/src/xml/simple-node.cpp +++ b/src/xml/simple-node.cpp @@ -174,7 +174,6 @@ SimpleNode::SimpleNode(SimpleNode const &node) _child_count(node._child_count), _cached_positions_valid(node._cached_positions_valid) { - _document = NULL; _document = NULL; _parent = _next = NULL; _first_child = _last_child = NULL; @@ -182,7 +181,7 @@ SimpleNode::SimpleNode(SimpleNode const &node) for ( Node *child = node._first_child ; child != NULL ; child = child->next() ) { - Node *child_copy=child->duplicate(); + Node *child_copy=child->duplicate(NULL); // FIXME child_copy->_setParent(this); if (_last_child) { @@ -591,12 +590,12 @@ void SimpleNode::mergeFrom(Node const *src, gchar const *key) { if (rch) { rch->mergeFrom(child, key); } else { - rch = child->duplicate(); + rch = child->duplicate(_document); appendChild(rch); rch->release(); } } else { - Node *rch=child->duplicate(); + Node *rch=child->duplicate(_document); appendChild(rch); rch->release(); } -- cgit v1.2.3