Commit 9a38acdf by Aditya Kumar Committed by Jonathan Wakely

Remove trailing whitespace in C++ headers

2016-08-24  Aditya Kumar  <hiraditya@msn.com>

	* include/bits/algorithmfwd.h: Remove trailing whitespace.
	* include/bits/shared_ptr_base.h: Likewise.

From-SVN: r239731
parent 0b6b8f85
2016-08-24 Aditya Kumar <hiraditya@msn.com>
* include/bits/algorithmfwd.h: Remove trailing whitespace.
* include/bits/shared_ptr_base.h: Likewise.
2016-08-23 Jonathan Wakely <jwakely@redhat.com> 2016-08-23 Jonathan Wakely <jwakely@redhat.com>
* include/debug/array (array): Add _GLIBCXX17_CONSTEXPR. * include/debug/array (array): Add _GLIBCXX17_CONSTEXPR.
......
...@@ -70,7 +70,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -70,7 +70,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
public: public:
virtual char const* what() const noexcept; virtual char const* what() const noexcept;
virtual ~bad_weak_ptr() noexcept; virtual ~bad_weak_ptr() noexcept;
}; };
// Substitute for bad_weak_ptr object in the case of -fno-exceptions. // Substitute for bad_weak_ptr object in the case of -fno-exceptions.
...@@ -108,31 +108,31 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -108,31 +108,31 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
class _Sp_counted_base class _Sp_counted_base
: public _Mutex_base<_Lp> : public _Mutex_base<_Lp>
{ {
public: public:
_Sp_counted_base() noexcept _Sp_counted_base() noexcept
: _M_use_count(1), _M_weak_count(1) { } : _M_use_count(1), _M_weak_count(1) { }
virtual virtual
~_Sp_counted_base() noexcept ~_Sp_counted_base() noexcept
{ } { }
// Called when _M_use_count drops to zero, to release the resources // Called when _M_use_count drops to zero, to release the resources
// managed by *this. // managed by *this.
virtual void virtual void
_M_dispose() noexcept = 0; _M_dispose() noexcept = 0;
// Called when _M_weak_count drops to zero. // Called when _M_weak_count drops to zero.
virtual void virtual void
_M_destroy() noexcept _M_destroy() noexcept
{ delete this; } { delete this; }
virtual void* virtual void*
_M_get_deleter(const std::type_info&) noexcept = 0; _M_get_deleter(const std::type_info&) noexcept = 0;
void void
_M_add_ref_copy() _M_add_ref_copy()
{ __gnu_cxx::__atomic_add_dispatch(&_M_use_count, 1); } { __gnu_cxx::__atomic_add_dispatch(&_M_use_count, 1); }
void void
_M_add_ref_lock(); _M_add_ref_lock();
...@@ -167,7 +167,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -167,7 +167,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
} }
} }
} }
void void
_M_weak_add_ref() noexcept _M_weak_add_ref() noexcept
{ __gnu_cxx::__atomic_add_dispatch(&_M_weak_count, 1); } { __gnu_cxx::__atomic_add_dispatch(&_M_weak_count, 1); }
...@@ -189,7 +189,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -189,7 +189,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_M_destroy(); _M_destroy();
} }
} }
long long
_M_get_use_count() const noexcept _M_get_use_count() const noexcept
{ {
...@@ -198,7 +198,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -198,7 +198,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return __atomic_load_n(&_M_use_count, __ATOMIC_RELAXED); return __atomic_load_n(&_M_use_count, __ATOMIC_RELAXED);
} }
private: private:
_Sp_counted_base(_Sp_counted_base const&) = delete; _Sp_counted_base(_Sp_counted_base const&) = delete;
_Sp_counted_base& operator=(_Sp_counted_base const&) = delete; _Sp_counted_base& operator=(_Sp_counted_base const&) = delete;
...@@ -229,7 +229,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -229,7 +229,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
} }
} }
template<> template<>
inline void inline void
_Sp_counted_base<_S_atomic>:: _Sp_counted_base<_S_atomic>::
_M_add_ref_lock() _M_add_ref_lock()
...@@ -241,10 +241,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -241,10 +241,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
if (__count == 0) if (__count == 0)
__throw_bad_weak_ptr(); __throw_bad_weak_ptr();
// Replace the current counter value with the old value + 1, as // Replace the current counter value with the old value + 1, as
// long as it's not changed meanwhile. // long as it's not changed meanwhile.
} }
while (!__atomic_compare_exchange_n(&_M_use_count, &__count, __count + 1, while (!__atomic_compare_exchange_n(&_M_use_count, &__count, __count + 1,
true, __ATOMIC_ACQ_REL, true, __ATOMIC_ACQ_REL,
__ATOMIC_RELAXED)); __ATOMIC_RELAXED));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment