]> git.saurik.com Git - wxWidgets.git/commitdiff
removed useless checks for tree==NULL in wxGenericTreeItem::DeleteChildren(), as...
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 7 Mar 2006 22:56:11 +0000 (22:56 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 7 Mar 2006 22:56:11 +0000 (22:56 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37874 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/treectlg.cpp

index c6d79cde38c74c8c00f90f8a68d73563b94a26d5..fd499ea6feb3e5db3110a2c0dcfa1497d5fd0cfc 100644 (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;
     }