2002-11-22 Laszlo Ersek <erseklaszlo@chello.hu>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 22 Nov 2002 18:53:53 +0000 (18:53 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 22 Nov 2002 18:53:53 +0000 (18:53 +0000)
    Paolo Carlini  <pcarlini@unitus.it>

PR libstdc++/8645
* include/bits/stl_tree.h (_Rb_tree_rebalance_for_erase):
Don't check that __w->_M_left != 0 and __w->_M_right != 0
when they can't be otherwise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59381 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_tree.h

index 826a327..c89b01e 100644 (file)
@@ -1,3 +1,11 @@
+2002-11-22  Laszlo Ersek  <erseklaszlo@chello.hu>
+            Paolo Carlini  <pcarlini@unitus.it>
+
+       PR libstdc++/8645
+       * include/bits/stl_tree.h (_Rb_tree_rebalance_for_erase):
+       Don't check that __w->_M_left != 0 and __w->_M_right != 0
+       when they can't be otherwise.
+
 2002-11-21  Phil Edwards  <pme@gcc.gnu.org>
 
        * docs/html/documentation.html:  Fix broken/thinko'd URL.
index ec21852..1e7fdf5 100644 (file)
@@ -457,7 +457,7 @@ namespace std
                  if (__w->_M_right == 0 
                      || __w->_M_right->_M_color == _M_black) 
                    {
-                     if (__w->_M_left) __w->_M_left->_M_color = _M_black;
+                     __w->_M_left->_M_color = _M_black;
                      __w->_M_color = _M_red;
                      _Rb_tree_rotate_right(__w, __root);
                      __w = __x_parent->_M_right;
@@ -494,7 +494,7 @@ namespace std
                {
                  if (__w->_M_left == 0 || __w->_M_left->_M_color == _M_black) 
                    {
-                     if (__w->_M_right) __w->_M_right->_M_color = _M_black;
+                     __w->_M_right->_M_color = _M_black;
                      __w->_M_color = _M_red;
                      _Rb_tree_rotate_left(__w, __root);
                      __w = __x_parent->_M_left;