From 7a205f505f4dc6fd94495e856442e6808c735a0b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Dumont?= Date: Thu, 7 Jun 2018 05:44:53 +0000 Subject: [PATCH] =?utf8?q?2018-06-07=20=20Fran=C3=A7ois=20Dumont=20=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * src/c++11/debug.cc (_Safe_iterator_base::_M_detach()): Reset state only if needed. (_Safe_iterator_base::_M_detach_single()): Likewise. (_Safe_local_iterator_base::_M_detach()): Reset state only if needed. (_Safe_local_iterator_base::_M_detach_single()): Likewise. From-SVN: r261262 --- libstdc++-v3/ChangeLog | 8 ++++++++ libstdc++-v3/src/c++11/debug.cc | 28 ++++++++++++++++------------ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 24d1849af7d..47c6b1fe52d 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,11 @@ +2018-06-07 François Dumont + + * src/c++11/debug.cc + (_Safe_iterator_base::_M_detach()): Reset state only if needed. + (_Safe_iterator_base::_M_detach_single()): Likewise. + (_Safe_local_iterator_base::_M_detach()): Reset state only if needed. + (_Safe_local_iterator_base::_M_detach_single()): Likewise. + 2018-06-06 Jonathan Wakely * include/bits/shared_ptr_base.h (__shared_count): Remove redundant diff --git a/libstdc++-v3/src/c++11/debug.cc b/libstdc++-v3/src/c++11/debug.cc index 67309942941..cb64dd9240e 100644 --- a/libstdc++-v3/src/c++11/debug.cc +++ b/libstdc++-v3/src/c++11/debug.cc @@ -377,9 +377,10 @@ namespace __gnu_debug _M_detach() { if (_M_sequence) - _M_sequence->_M_detach(this); - - _M_reset(); + { + _M_sequence->_M_detach(this); + _M_reset(); + } } void @@ -387,9 +388,10 @@ namespace __gnu_debug _M_detach_single() throw () { if (_M_sequence) - _M_sequence->_M_detach_single(this); - - _M_reset(); + { + _M_sequence->_M_detach_single(this); + _M_reset(); + } } void @@ -460,9 +462,10 @@ namespace __gnu_debug _M_detach() { if (_M_sequence) - _M_get_container()->_M_detach_local(this); - - _M_reset(); + { + _M_get_container()->_M_detach_local(this); + _M_reset(); + } } void @@ -470,9 +473,10 @@ namespace __gnu_debug _M_detach_single() throw () { if (_M_sequence) - _M_get_container()->_M_detach_local_single(this); - - _M_reset(); + { + _M_get_container()->_M_detach_local_single(this); + _M_reset(); + } } void -- 2.30.2