diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-01-20 16:50:03 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-01-21 14:03:43 +0100 |
commit | f53972b0285cfd11da30f2723a662ff76c40c757 (patch) | |
tree | 718a6833112503257cb6f7cce7bc56ec68c7b32e | |
parent | c4b3801c22c6d4dc6fe34033089c6398bcd433d3 (diff) |
Some more loplugin:cstylecast: starmath
Change-Id: I0d1c743343d8f84c0491957ad43d8b16d9490622
-rw-r--r-- | starmath/inc/node.hxx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx index e70d5a3097cb..a44ed3596c57 100644 --- a/starmath/inc/node.hxx +++ b/starmath/inc/node.hxx @@ -231,13 +231,7 @@ public: } protected: /** Sets parent on children of this node */ - void ClaimPaternity(){ - SmNode* pNode; - sal_uInt16 nSize = GetNumSubNodes(); - for (sal_uInt16 i = 0; i < nSize; i++) - if (NULL != (pNode = GetSubNode(i))) - pNode->SetParent((SmStructureNode*)this); //Cast is valid if we have children - } + inline void ClaimPaternity(); private: SmStructureNode* aParentNode; void DumpAsDot(std::ostream &out, OUString* label, int number, int& id, int parent) const; @@ -352,8 +346,13 @@ public: } }; - - +inline void SmNode::ClaimPaternity() { + SmNode* pNode; + sal_uInt16 nSize = GetNumSubNodes(); + for (sal_uInt16 i = 0; i < nSize; i++) + if (NULL != (pNode = GetSubNode(i))) + pNode->SetParent(static_cast<SmStructureNode*>(this)); //Cast is valid if we have children +} /** Abstract base class for all visible node * |