aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaszlo Ersek <erseklaszlo@chello.hu>2002-11-22 19:53:53 +0100
committerPaolo Carlini <paolo@gcc.gnu.org>2002-11-22 18:53:53 +0000
commit726a4d6d5e056501f909f6e6a9122483a44028ad (patch)
tree654dc79074e10dddccbd97c85f074c42eb904d97
parentfc589541ad95ba59a0c9bae6be6559368b9f6f80 (diff)
downloadgcc-726a4d6d5e056501f909f6e6a9122483a44028ad.zip
gcc-726a4d6d5e056501f909f6e6a9122483a44028ad.tar.gz
gcc-726a4d6d5e056501f909f6e6a9122483a44028ad.tar.bz2
re PR libstdc++/8645 (unnecessary non-0 checks in stl_tree.h)
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. Co-Authored-By: Paolo Carlini <pcarlini@unitus.it> From-SVN: r59381
-rw-r--r--libstdc++-v3/ChangeLog8
-rw-r--r--libstdc++-v3/include/bits/stl_tree.h4
2 files changed, 10 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 826a327..c89b01e 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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.
diff --git a/libstdc++-v3/include/bits/stl_tree.h b/libstdc++-v3/include/bits/stl_tree.h
index ec21852..1e7fdf5 100644
--- a/libstdc++-v3/include/bits/stl_tree.h
+++ b/libstdc++-v3/include/bits/stl_tree.h
@@ -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;