From 6ab8ea2d586e8b847e58c05c538d6ed21d11f36a Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Sat, 1 May 2021 17:00:02 +0200 Subject: [PATCH] QRandom: enable a check also on MSVC We require MSVC 2019 these days, so we can actually check for constexpr initialization. Change-Id: Idc14b785d51c8baaa0bca0ec7dd2e8a85a7e2092 Reviewed-by: Thiago Macieira --- src/corelib/global/qrandom.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp index 272449438b..230310f20f 100644 --- a/src/corelib/global/qrandom.cpp +++ b/src/corelib/global/qrandom.cpp @@ -368,13 +368,8 @@ struct QRandomGenerator::SystemAndGlobalGenerators void confirmLiteral() { -#if !defined(Q_CC_MSVC) && !defined(Q_OS_INTEGRITY) - // Currently fails to compile with MSVC 2017, saying QBasicMutex is not - // a literal type. Disassembly with MSVC 2013 and 2015 shows it is - // actually a literal; MSVC 2017 has a bug relating to this, so we're - // withhold judgement for now. Integrity's compiler is unable to - // guarantee g's alignment for some reason. - +#if !defined(Q_OS_INTEGRITY) + // Integrity's compiler is unable to guarantee g's alignment for some reason. constexpr SystemAndGlobalGenerators g = {}; Q_UNUSED(g); #endif