Inline the QPropertyBindingPrivatePtr destructor
In many cases, it only derefs and does nothing else. Inline the fast code path. Pick-to: dev 6.0.0 Change-Id: Ib605c385c1683f7833f7189c84d6cf4eb5b0e59e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
parent
2721728c90
commit
eda4c29eb2
@ -47,10 +47,9 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
using namespace QtPrivate;
|
||||
|
||||
QPropertyBindingPrivatePtr::~QPropertyBindingPrivatePtr()
|
||||
void QPropertyBindingPrivatePtr::destroyAndFreeMemory()
|
||||
{
|
||||
if (d && (--d->ref == 0))
|
||||
QPropertyBindingPrivate::destroyAndFreeMemory(static_cast<QPropertyBindingPrivate *>(d));
|
||||
QPropertyBindingPrivate::destroyAndFreeMemory(static_cast<QPropertyBindingPrivate *>(d));
|
||||
}
|
||||
|
||||
void QPropertyBindingPrivatePtr::reset(QtPrivate::RefCounted *ptr) noexcept
|
||||
|
@ -85,7 +85,12 @@ public:
|
||||
T *take() noexcept { T *x = d; d = nullptr; return x; }
|
||||
|
||||
QPropertyBindingPrivatePtr() noexcept : d(nullptr) { }
|
||||
Q_CORE_EXPORT ~QPropertyBindingPrivatePtr();
|
||||
~QPropertyBindingPrivatePtr()
|
||||
{
|
||||
if (d && (--d->ref == 0))
|
||||
destroyAndFreeMemory();
|
||||
}
|
||||
Q_CORE_EXPORT void destroyAndFreeMemory();
|
||||
|
||||
explicit QPropertyBindingPrivatePtr(T *data) noexcept : d(data) { if (d) d->addRef(); }
|
||||
QPropertyBindingPrivatePtr(const QPropertyBindingPrivatePtr &o) noexcept
|
||||
|
Loading…
x
Reference in New Issue
Block a user