Some more loplugin:cstylecast: starmath

Change-Id: I0d1c743343d8f84c0491957ad43d8b16d9490622
This commit is contained in:
Stephan Bergmann
2015-01-20 16:50:03 +01:00
parent c4b3801c22
commit f53972b028

View File

@@ -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
*