compilerplugins/clang/unusedmethods.results | 2 -- starmath/inc/node.hxx | 10 ---------- starmath/source/node.cxx | 27 --------------------------- 3 files changed, 39 deletions(-)
New commits: commit df6e819a8f76f927bd7a568a95a535299e795a06 Author: Julien Nabet <[email protected]> AuthorDate: Sat Jun 3 22:16:44 2023 +0200 Commit: Julien Nabet <[email protected]> CommitDate: Sat Jun 3 23:15:02 2023 +0200 Remove unused SmStructureNode::SetSubNodesBinMo with plain pointers (starmath) and keep the remaining one which uses unique_ptr Change-Id: I0e4e4aff5c202897a27dfef97750c14c3c5736bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152581 Tested-by: Jenkins Reviewed-by: Julien Nabet <[email protected]> diff --git a/compilerplugins/clang/unusedmethods.results b/compilerplugins/clang/unusedmethods.results index b7a344496442..8c0beae1aa23 100644 --- a/compilerplugins/clang/unusedmethods.results +++ b/compilerplugins/clang/unusedmethods.results @@ -3034,8 +3034,6 @@ starmath/inc/node.hxx:508 SmNode * SmStructureNode::GetSubNodeBinMo(unsigned long) const starmath/inc/node.hxx:533 void SmStructureNode::SetSubNodes(SmNode *,SmNode *,SmNode *) -starmath/inc/node.hxx:554 - void SmStructureNode::SetSubNodesBinMo(SmNode *,SmNode *,SmNode *) starmath/inc/nodetype.hxx:59 _Bool starmathdatabase::isStructuralNode(enum SmNodeType) starmath/inc/nodetype.hxx:71 diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index f162b83aa754..e0b597306509 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -543,16 +543,6 @@ public: void SetSubNodesBinMo(std::unique_ptr<SmNode> pFirst, std::unique_ptr<SmNode> pSecond, std::unique_ptr<SmNode> pThird = nullptr); - /** - * Sets subnodes, used for operators. - * The data is reordered so the items are correctly ordered. - * @param pFirst - * @param pSecond - * @param pThird - * @return - */ - void SetSubNodesBinMo(SmNode* pFirst, SmNode* pSecond, SmNode* pThird); - /** * Sets subnodes. * @param rNodeArray diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index 5beab34c731d..7a9d42bd4fe1 100644 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -416,33 +416,6 @@ void SmStructureNode::SetSubNodesBinMo(std::unique_ptr<SmNode> pFirst, std::uniq ClaimPaternity(); } -void SmStructureNode::SetSubNodesBinMo(SmNode* pFirst, SmNode* pSecond, SmNode* pThird) -{ - if(GetType()==SmNodeType::BinDiagonal) - { - size_t nSize = pSecond ? 3 : (pThird ? 2 : (pFirst ? 1 : 0)); - maSubNodes.resize( nSize ); - if (pFirst) - maSubNodes[0] = pFirst; - if (pSecond) - maSubNodes[2] = pSecond; - if (pThird) - maSubNodes[1] = pThird; - } - else - { - size_t nSize = pThird ? 3 : (pSecond ? 2 : (pFirst ? 1 : 0)); - maSubNodes.resize( nSize ); - if (pFirst) - maSubNodes[0] = pFirst; - if (pSecond) - maSubNodes[1] = pSecond; - if (pThird) - maSubNodes[2] = pThird; - } - ClaimPaternity(); -} - void SmStructureNode::SetSubNodes(SmNodeArray&& rNodeArray) { maSubNodes = std::move(rNodeArray);
