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; }
// operations
// deletes all children notifying the treectrl about it if !NULL
// pointer given
void DeleteChildren(wxGenericTreeCtrl *tree = NULL);
// deletes all children notifying the treectrl about it
void DeleteChildren(wxGenericTreeCtrl *tree);
// get count of all children (and grand children if 'recursively')
size_t GetChildrenCount(bool recursively = true) const;
@ -548,11 +548,10 @@ void wxGenericTreeItem::DeleteChildren(wxGenericTreeCtrl *tree)
for ( size_t n = 0; n < count; n++ )
{
wxGenericTreeItem *child = m_children[n];
if (tree)
tree->SendDeleteEvent(child);
tree->SendDeleteEvent(child);
child->DeleteChildren(tree);
if (child == tree->m_select_me)
if ( child == tree->m_select_me )
tree->m_select_me = NULL;
delete child;
}