summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetatype.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2022-07-20 13:36:46 -0700
committerThiago Macieira <thiago.macieira@intel.com>2022-07-27 12:35:50 -0700
commit8738d9a6a861f79df83e563db41e8b95adeed14a (patch)
tree72be6ae6d4a42f1b37b4ef7a0cc7e35d9ce55162 /src/corelib/kernel/qmetatype.cpp
parent27b10261398304978c3dc0166aad28d80c9b359e (diff)
QVariant: move the check for std::nullptr_t a bit up in customConstruct
Avoids having to do work after QMetaType::construct() returns. That can't get the tail-call optimization right now because it is a non- inline non-static member function, so the QMetaType must be spilled to the stack. Change-Id: I3859764fed084846bcb0fffd1703a3ffc723f43f Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/kernel/qmetatype.cpp')
-rw-r--r--src/corelib/kernel/qmetatype.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp
index 16d51ae7a1..f7fa838911 100644
--- a/src/corelib/kernel/qmetatype.cpp
+++ b/src/corelib/kernel/qmetatype.cpp
@@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE
QT_IMPL_METATYPE_EXTERN_TAGGED(QtMetaTypePrivate::QPairVariantInterfaceImpl, QPairVariantInterfaceImpl)
-using QtMetaTypePrivate::isVoid;
+using QtMetaTypePrivate::isInterfaceFor;
namespace {
@@ -828,22 +828,22 @@ bool QMetaType::equals(const void *lhs, const void *rhs) const
bool QMetaType::isDefaultConstructible(const QtPrivate::QMetaTypeInterface *iface) noexcept
{
- return !isVoid(iface) && QtMetaTypePrivate::isDefaultConstructible(iface);
+ return !isInterfaceFor<void>(iface) && QtMetaTypePrivate::isDefaultConstructible(iface);
}
bool QMetaType::isCopyConstructible(const QtPrivate::QMetaTypeInterface *iface) noexcept
{
- return !isVoid(iface) && QtMetaTypePrivate::isCopyConstructible(iface);
+ return !isInterfaceFor<void>(iface) && QtMetaTypePrivate::isCopyConstructible(iface);
}
bool QMetaType::isMoveConstructible(const QtPrivate::QMetaTypeInterface *iface) noexcept
{
- return !isVoid(iface) && QtMetaTypePrivate::isMoveConstructible(iface);
+ return !isInterfaceFor<void>(iface) && QtMetaTypePrivate::isMoveConstructible(iface);
}
bool QMetaType::isDestructible(const QtPrivate::QMetaTypeInterface *iface) noexcept
{
- return !isVoid(iface) && QtMetaTypePrivate::isDestructible(iface);
+ return !isInterfaceFor<void>(iface) && QtMetaTypePrivate::isDestructible(iface);
}
/*!