summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qproperty.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-11-25 12:58:11 +0100
committerLars Knoll <lars.knoll@qt.io>2020-11-26 21:40:02 +0100
commiteda4c29eb26dab32e22040bdda0b9b9109b1408b (patch)
tree01555e9455a7a36e946fc50664b05ca974ab5c4e /src/corelib/kernel/qproperty.cpp
parent2721728c9056b442c0281f20792f19eb6a491aa0 (diff)
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>
Diffstat (limited to 'src/corelib/kernel/qproperty.cpp')
-rw-r--r--src/corelib/kernel/qproperty.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/corelib/kernel/qproperty.cpp b/src/corelib/kernel/qproperty.cpp
index 3eab02ac86..ce2e3d0ce1 100644
--- a/src/corelib/kernel/qproperty.cpp
+++ b/src/corelib/kernel/qproperty.cpp
@@ -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