Fix -Wempty-body warnings for debug assertions

* include/bits/node_handle.h (_Node_handle_common::operator=)
	(_Node_handle_common::_M_swap): Add braces around debug assertions.

From-SVN: r255317
This commit is contained in:
Jonathan Wakely 2017-12-01 15:10:20 +00:00 committed by Jonathan Wakely
parent f1338a2dcb
commit b7b61489b7
2 changed files with 12 additions and 3 deletions

View File

@ -1,5 +1,8 @@
2017-12-01 Jonathan Wakely <jwakely@redhat.com>
* include/bits/node_handle.h (_Node_handle_common::operator=)
(_Node_handle_common::_M_swap): Add braces around debug assertions.
* include/ext/ropeimpl.h (rope::_S_dump): Use const char*.
* libsupc++/nested_exception.h (__throw_with_nested_impl): Add

View File

@ -87,10 +87,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|| !this->_M_alloc)
this->_M_alloc = std::move(__nh._M_alloc);
else
{
__glibcxx_assert(this->_M_alloc == __nh._M_alloc);
}
}
else
{
__glibcxx_assert(_M_alloc);
}
__nh._M_ptr = nullptr;
__nh._M_alloc = nullopt;
return *this;
@ -109,8 +113,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|| !_M_alloc || !__nh._M_alloc)
_M_alloc.swap(__nh._M_alloc);
else
{
__glibcxx_assert(_M_alloc == __nh._M_alloc);
}
}
private:
void