summaryrefslogtreecommitdiff
path: root/starmath/inc/node.hxx
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2018-02-18 16:00:39 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2018-02-19 00:55:54 +0100
commit6893d8b193fa809f7cd7cd9c44b1733b6b5607cb (patch)
tree0c014efbac978700873f1debbb25e11f69342544 /starmath/inc/node.hxx
parent4f97bfb3c2f4b4bae40edbdfcdcfcdd8587c1c11 (diff)
starmath: Spare unnecessary assignments
Change-Id: I8ddc1c04a76475d63a39dc21d36cda7a7aa26b9e Reviewed-on: https://gerrit.libreoffice.org/49921 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'starmath/inc/node.hxx')
-rw-r--r--starmath/inc/node.hxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index f4d90b9ada05..7479e3385503 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -266,12 +266,13 @@ public:
{
//Resize subnodes array
maSubNodes.resize(nIndex + 1);
- //Set new slots to NULL
- for (size_t i = size; i < nIndex+1; i++)
+ //Set new slots to NULL except at nIndex
+ for (size_t i = size; i < nIndex; i++)
maSubNodes[i] = nullptr;
}
maSubNodes[nIndex] = pNode;
- ClaimPaternity();
+ if (pNode)
+ pNode->SetParent(this);
}
private: