summaryrefslogtreecommitdiff
path: root/starmath/source/node.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'starmath/source/node.cxx')
-rw-r--r--starmath/source/node.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 9e1ef9279997..d78e847350e1 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -384,16 +384,16 @@ void SmStructureNode::ClearSubNodes()
maSubNodes.clear();
}
-void SmStructureNode::SetSubNodes(SmNode *pFirst, SmNode *pSecond, SmNode *pThird)
+void SmStructureNode::SetSubNodes(std::unique_ptr<SmNode> pFirst, std::unique_ptr<SmNode> pSecond, std::unique_ptr<SmNode> pThird)
{
size_t nSize = pThird ? 3 : (pSecond ? 2 : (pFirst ? 1 : 0));
maSubNodes.resize( nSize );
if (pFirst)
- maSubNodes[0] = pFirst;
+ maSubNodes[0] = pFirst.release();
if (pSecond)
- maSubNodes[1] = pSecond;
+ maSubNodes[1] = pSecond.release();
if (pThird)
- maSubNodes[2] = pThird;
+ maSubNodes[2] = pThird.release();
ClaimPaternity();
}