diff --git a/include/DOM/Simple/NodeImpl.hpp b/include/DOM/Simple/NodeImpl.hpp index 0d15f4ec..736b3348 100644 --- a/include/DOM/Simple/NodeImpl.hpp +++ b/include/DOM/Simple/NodeImpl.hpp @@ -334,13 +334,13 @@ class NodeImplWithChildren : public NodeImpl, return 0; } // getLastChild - virtual DOMNode_implT* insertBefore(DOMNode_implT*newChild, DOMNode_implT*refChild) + virtual DOMNode_implT* insertBefore(DOMNode_implT* newChild, DOMNode_implT* refChild) { return do_insertBefore(dynamic_cast(newChild), dynamic_cast(refChild)); } // insertBefore - virtual DOMNode_implT* replaceChild(DOMNode_implT*newChild, DOMNode_implT*oldChild) + virtual DOMNode_implT* replaceChild(DOMNode_implT* newChild, DOMNode_implT* oldChild) { return do_replaceChild(dynamic_cast(newChild), dynamic_cast(oldChild)); @@ -435,7 +435,7 @@ class NodeImplWithChildren : public NodeImpl, DOMNode_implT* lc = newChild->getLastChild(); replaceChild(newChild->removeChild(lc), oldChild); insertBefore(newChild, lc); - return newChild; + return oldChild; } // if ... checkCanAdd(newChild);