diff options
Diffstat (limited to 'codemaker/source/codemaker/exceptiontree.cxx')
-rw-r--r-- | codemaker/source/codemaker/exceptiontree.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/codemaker/source/codemaker/exceptiontree.cxx b/codemaker/source/codemaker/exceptiontree.cxx index 0f63a5bd0ab5..e9edd6d8e146 100644 --- a/codemaker/source/codemaker/exceptiontree.cxx +++ b/codemaker/source/codemaker/exceptiontree.cxx @@ -36,14 +36,11 @@ using codemaker::ExceptionTreeNode; ExceptionTreeNode * ExceptionTreeNode::add(rtl::OString const & theName) { std::unique_ptr< ExceptionTreeNode > node(new ExceptionTreeNode(theName)); - children.push_back(node.get()); - return node.release(); + children.push_back(std::move(node)); + return children.back().get(); } void ExceptionTreeNode::clearChildren() { - for (ExceptionTreeNode* child : children) { - delete child; - } children.clear(); } @@ -85,7 +82,7 @@ void ExceptionTree::add( break; } if ((*j)->name == *i) { - node = *j; + node = j->get(); break; } } |