From 6f0df02d002356625f10683ef84da7685d92a2c4 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Wed, 12 Aug 2020 14:14:02 +0200 Subject: Replace Qt CONSTEXPR defines with constexpr Both normal and relaxed constexpr are required by our new minimum of C++17. Change-Id: Ic028b88a2e7a6cb7d5925f3133b9d54859a81744 Reviewed-by: Sona Kurazyan --- src/corelib/global/qrandom.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/corelib/global/qrandom.h') diff --git a/src/corelib/global/qrandom.h b/src/corelib/global/qrandom.h index 4e27ef1edc..7bb90de2bb 100644 --- a/src/corelib/global/qrandom.h +++ b/src/corelib/global/qrandom.h @@ -169,8 +169,8 @@ public: void seed(quint32 s = 1) { *this = { s }; } void seed(std::seed_seq &sseq) noexcept { *this = { sseq }; } Q_CORE_EXPORT void discard(unsigned long long z); - static Q_DECL_CONSTEXPR result_type min() { return std::numeric_limits::min(); } - static Q_DECL_CONSTEXPR result_type max() { return std::numeric_limits::max(); } + static constexpr result_type min() { return std::numeric_limits::min(); } + static constexpr result_type max() { return std::numeric_limits::max(); } static inline Q_DECL_CONST_FUNCTION QRandomGenerator *system(); static inline Q_DECL_CONST_FUNCTION QRandomGenerator *global(); @@ -203,7 +203,7 @@ private: static_assert(std::is_trivially_destructible::value, "std::mersenne_twister not trivially destructible as expected"); - Q_DECL_CONSTEXPR Storage(); + constexpr Storage(); }; uint type; Storage storage; @@ -245,8 +245,8 @@ public: QRandomGenerator::discard(z * 2); } - static Q_DECL_CONSTEXPR result_type min() { return std::numeric_limits::min(); } - static Q_DECL_CONSTEXPR result_type max() { return std::numeric_limits::max(); } + static constexpr result_type min() { return std::numeric_limits::min(); } + static constexpr result_type max() { return std::numeric_limits::max(); } static Q_DECL_CONST_FUNCTION Q_CORE_EXPORT QRandomGenerator64 *system(); static Q_DECL_CONST_FUNCTION Q_CORE_EXPORT QRandomGenerator64 *global(); static Q_CORE_EXPORT QRandomGenerator64 securelySeeded(); -- cgit v1.2.3