mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Remove DISALLOW_ macro from include/ (see issue #3234)
Also perform related C++ cleanup: - Use =default instead of {} for default implementations of constructors/destructors. - Replace typedef with using.
This commit is contained in:
@ -49,7 +49,6 @@
|
||||
#include "include/base/cef_build.h"
|
||||
#include "include/base/cef_compiler_specific.h"
|
||||
#include "include/base/cef_logging.h"
|
||||
#include "include/base/cef_macros.h"
|
||||
#include "include/base/cef_scoped_refptr.h"
|
||||
#include "include/base/cef_template_util.h"
|
||||
#include "include/base/cef_thread_checker.h"
|
||||
@ -76,6 +75,9 @@ class RefCountedBase {
|
||||
#endif
|
||||
}
|
||||
|
||||
RefCountedBase(const RefCountedBase&) = delete;
|
||||
RefCountedBase& operator=(const RefCountedBase&) = delete;
|
||||
|
||||
~RefCountedBase() {
|
||||
#if DCHECK_IS_ON()
|
||||
DCHECK(in_dtor_) << "RefCounted object deleted without calling Release()";
|
||||
@ -168,8 +170,6 @@ class RefCountedBase {
|
||||
mutable bool in_dtor_ = false;
|
||||
mutable ThreadChecker thread_checker_;
|
||||
#endif
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(RefCountedBase);
|
||||
};
|
||||
|
||||
class RefCountedThreadSafeBase {
|
||||
@ -186,6 +186,9 @@ class RefCountedThreadSafeBase {
|
||||
#endif
|
||||
}
|
||||
|
||||
RefCountedThreadSafeBase(const RefCountedThreadSafeBase&) = delete;
|
||||
RefCountedThreadSafeBase& operator=(const RefCountedThreadSafeBase&) = delete;
|
||||
|
||||
#if DCHECK_IS_ON()
|
||||
~RefCountedThreadSafeBase();
|
||||
#else
|
||||
@ -259,8 +262,6 @@ class RefCountedThreadSafeBase {
|
||||
mutable bool needs_adopt_ref_ = false;
|
||||
mutable bool in_dtor_ = false;
|
||||
#endif
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(RefCountedThreadSafeBase);
|
||||
};
|
||||
|
||||
// ScopedAllowCrossThreadRefCountAccess disables the check documented on
|
||||
@ -357,6 +358,9 @@ class RefCounted : public cef_subtle::RefCountedBase {
|
||||
|
||||
RefCounted() : cef_subtle::RefCountedBase(T::kRefCountPreference) {}
|
||||
|
||||
RefCounted(const RefCounted&) = delete;
|
||||
RefCounted& operator=(const RefCounted&) = delete;
|
||||
|
||||
void AddRef() const { cef_subtle::RefCountedBase::AddRef(); }
|
||||
|
||||
void Release() const {
|
||||
@ -379,8 +383,6 @@ class RefCounted : public cef_subtle::RefCountedBase {
|
||||
static void DeleteInternal(const U* x) {
|
||||
delete x;
|
||||
}
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(RefCounted);
|
||||
};
|
||||
|
||||
// Forward declaration.
|
||||
@ -424,6 +426,9 @@ class RefCountedThreadSafe : public cef_subtle::RefCountedThreadSafeBase {
|
||||
explicit RefCountedThreadSafe()
|
||||
: cef_subtle::RefCountedThreadSafeBase(T::kRefCountPreference) {}
|
||||
|
||||
RefCountedThreadSafe(const RefCountedThreadSafe&) = delete;
|
||||
RefCountedThreadSafe& operator=(const RefCountedThreadSafe&) = delete;
|
||||
|
||||
void AddRef() const { AddRefImpl(T::kRefCountPreference); }
|
||||
|
||||
void Release() const {
|
||||
@ -450,8 +455,6 @@ class RefCountedThreadSafe : public cef_subtle::RefCountedThreadSafeBase {
|
||||
void AddRefImpl(cef_subtle::StartRefCountFromOneTag) const {
|
||||
cef_subtle::RefCountedThreadSafeBase::AddRefWithCheck();
|
||||
}
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(RefCountedThreadSafe);
|
||||
};
|
||||
|
||||
//
|
||||
|
Reference in New Issue
Block a user