From c3c5d2cab07ffed1ddfb7978870c05917d89fa39 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Thu, 17 Nov 2022 20:35:28 -0800 Subject: [PATCH] QUuid: use NSDMI to initialize the members Change-Id: Id8e48e8f498c4a029619fffd172893c31bb0aba1 Reviewed-by: Ivan Solovev --- src/corelib/plugin/quuid.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/corelib/plugin/quuid.h b/src/corelib/plugin/quuid.h index 64aa891ba13..bcd78d85e78 100644 --- a/src/corelib/plugin/quuid.h +++ b/src/corelib/plugin/quuid.h @@ -55,7 +55,7 @@ public: Id128 = 3 }; - constexpr QUuid() noexcept : data1(0), data2(0), data3(0), data4{0,0,0,0,0,0,0,0} {} + constexpr QUuid() noexcept {} constexpr QUuid(uint l, ushort w1, ushort w2, uchar b1, uchar b2, uchar b3, uchar b4, uchar b5, uchar b6, uchar b7, uchar b8) noexcept @@ -158,10 +158,10 @@ public: NSUUID *toNSUUID() const Q_DECL_NS_RETURNS_AUTORELEASED; #endif - uint data1; - ushort data2; - ushort data3; - uchar data4[8]; + uint data1 = 0; + ushort data2 = 0; + ushort data3 = 0; + uchar data4[8] = {}; }; Q_DECLARE_TYPEINFO(QUuid, Q_PRIMITIVE_TYPE);