[Libreoffice-commits] core.git: starmath/inc

Takeshi Abe tabe at fixedpoint.jp
Sun Feb 18 23:56:15 UTC 2018


 starmath/inc/node.hxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 6893d8b193fa809f7cd7cd9c44b1733b6b5607cb
Author: Takeshi Abe <tabe at fixedpoint.jp>
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 <ci at libreoffice.org>
    Reviewed-by: Takeshi Abe <tabe at fixedpoint.jp>

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:


More information about the Libreoffice-commits mailing list