From 87bc5f7a7ca6240845cc59d877824c7de01d614d Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 15 Jun 2020 08:57:53 +0200 Subject: Make the default constructor of QMetaType constexpr And inline the copy constructor forwarding to another one. Change-Id: I3c4f76f7b14edd84f512ef0687416b20940e333a Reviewed-by: Karsten Heimrich --- src/corelib/kernel/qmetatype.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib/kernel/qmetatype.h') diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index d964c16915..f59acf2d54 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -546,9 +546,9 @@ public: explicit QMetaType(int type); explicit QMetaType(QtPrivate::QMetaTypeInterface *d); - QMetaType(); + constexpr QMetaType() : d_ptr(nullptr) {} ~QMetaType(); - QMetaType(const QMetaType &other); + QMetaType(const QMetaType &other) : QMetaType(other.d_ptr) {} QMetaType &operator=(const QMetaType &); QMetaType(QMetaType &&other) : d_ptr(other.d_ptr) { other.d_ptr = nullptr; } QMetaType &operator=(QMetaType &&other) -- cgit v1.2.3