diff options
Diffstat (limited to 'base/ref_counted.cc')
-rw-r--r-- | base/ref_counted.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/base/ref_counted.cc b/base/ref_counted.cc index 2f795ea..2d459ae 100644 --- a/base/ref_counted.cc +++ b/base/ref_counted.cc @@ -51,6 +51,11 @@ bool RefCountedBase::Release() const { return false; } +bool RefCountedThreadSafeBase::HasOneRef() const { + return AtomicRefCountIsOne( + &const_cast<RefCountedThreadSafeBase*>(this)->ref_count_); +} + RefCountedThreadSafeBase::RefCountedThreadSafeBase() : ref_count_(0) { #ifndef NDEBUG in_dtor_ = false; @@ -85,11 +90,6 @@ bool RefCountedThreadSafeBase::Release() const { return false; } -bool RefCountedThreadSafeBase::HasOneRef() const { - return AtomicRefCountIsOne( - &const_cast<RefCountedThreadSafeBase*>(this)->ref_count_); -} - } // namespace subtle } // namespace base |