starmath/inc/node.hxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
New commits: commit 6893d8b193fa809f7cd7cd9c44b1733b6b5607cb Author: Takeshi Abe <[email protected]> Date: Sun Feb 18 16:00:39 2018 +0900 starmath: Spare unnecessary assignments Change-Id: I8ddc1c04a76475d63a39dc21d36cda7a7aa26b9e Reviewed-on: https://gerrit.libreoffice.org/49921 Tested-by: Jenkins <[email protected]> Reviewed-by: Takeshi Abe <[email protected]> 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: _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
