diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-08-12 14:14:02 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-08-14 15:52:58 +0200 |
commit | 6f0df02d002356625f10683ef84da7685d92a2c4 (patch) | |
tree | 46713209af459ebda534c3404f48c5f5c80ba3f8 /src/corelib/kernel/qdeadlinetimer.h | |
parent | 44cce1a2ea9dadd8b2de93f40de34269dda703c0 (diff) | |
download | qtbase-6f0df02d002356625f10683ef84da7685d92a2c4.tar.gz |
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 <sona.kurazyan@qt.io>
Diffstat (limited to 'src/corelib/kernel/qdeadlinetimer.h')
-rw-r--r-- | src/corelib/kernel/qdeadlinetimer.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/kernel/qdeadlinetimer.h b/src/corelib/kernel/qdeadlinetimer.h index 99e09eb31f..180d5fe431 100644 --- a/src/corelib/kernel/qdeadlinetimer.h +++ b/src/corelib/kernel/qdeadlinetimer.h @@ -63,16 +63,16 @@ class Q_CORE_EXPORT QDeadlineTimer public: enum ForeverConstant { Forever }; - Q_DECL_CONSTEXPR QDeadlineTimer(Qt::TimerType type_ = Qt::CoarseTimer) noexcept + constexpr QDeadlineTimer(Qt::TimerType type_ = Qt::CoarseTimer) noexcept : t1(0), t2(0), type(type_) {} - Q_DECL_CONSTEXPR QDeadlineTimer(ForeverConstant, Qt::TimerType type_ = Qt::CoarseTimer) noexcept + constexpr QDeadlineTimer(ForeverConstant, Qt::TimerType type_ = Qt::CoarseTimer) noexcept : t1(std::numeric_limits<qint64>::max()), t2(0), type(type_) {} explicit QDeadlineTimer(qint64 msecs, Qt::TimerType type = Qt::CoarseTimer) noexcept; void swap(QDeadlineTimer &other) noexcept { qSwap(t1, other.t1); qSwap(t2, other.t2); qSwap(type, other.type); } - Q_DECL_CONSTEXPR bool isForever() const noexcept + constexpr bool isForever() const noexcept { return t1 == (std::numeric_limits<qint64>::max)(); } bool hasExpired() const noexcept; |