Skip to content

Commit

Permalink
2018-06-07 François Dumont <fdumont@gcc.gnu.org>
Browse files Browse the repository at this point in the history
	* 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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261262 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
fdumont committed Jun 7, 2018
1 parent 6b9cd91 commit ed76efe
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 12 deletions.
8 changes: 8 additions & 0 deletions libstdc++-v3/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2018-06-07 François Dumont <fdumont@gcc.gnu.org>

* 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 <jwakely@redhat.com>

* include/bits/shared_ptr_base.h (__shared_count): Remove redundant
Expand Down
28 changes: 16 additions & 12 deletions libstdc++-v3/src/c++11/debug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -377,19 +377,21 @@ namespace __gnu_debug
_M_detach()
{
if (_M_sequence)
_M_sequence->_M_detach(this);

_M_reset();
{
_M_sequence->_M_detach(this);
_M_reset();
}
}

void
_Safe_iterator_base::
_M_detach_single() throw ()
{
if (_M_sequence)
_M_sequence->_M_detach_single(this);

_M_reset();
{
_M_sequence->_M_detach_single(this);
_M_reset();
}
}

void
Expand Down Expand Up @@ -460,19 +462,21 @@ 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
_Safe_local_iterator_base::
_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
Expand Down

0 comments on commit ed76efe

Please sign in to comment.