removed useless checks for tree==NULL in wxGenericTreeItem::DeleteChildren(), as tree==this of the calling object (coverity checker CID 6)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37874 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-03-07 22:56:11 +00:00
parent 91894db3d7
commit 66619ee50c

View File

@@ -199,9 +199,9 @@ public:
wxGenericTreeItem *GetParent() const { return m_parent; } wxGenericTreeItem *GetParent() const { return m_parent; }
// operations // operations
// deletes all children notifying the treectrl about it if !NULL
// pointer given // deletes all children notifying the treectrl about it
void DeleteChildren(wxGenericTreeCtrl *tree = NULL); void DeleteChildren(wxGenericTreeCtrl *tree);
// get count of all children (and grand children if 'recursively') // get count of all children (and grand children if 'recursively')
size_t GetChildrenCount(bool recursively = true) const; size_t GetChildrenCount(bool recursively = true) const;
@@ -548,7 +548,6 @@ void wxGenericTreeItem::DeleteChildren(wxGenericTreeCtrl *tree)
for ( size_t n = 0; n < count; n++ ) for ( size_t n = 0; n < count; n++ )
{ {
wxGenericTreeItem *child = m_children[n]; wxGenericTreeItem *child = m_children[n];
if (tree)
tree->SendDeleteEvent(child); tree->SendDeleteEvent(child);
child->DeleteChildren(tree); child->DeleteChildren(tree);