summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qglobalstatic.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/global/qglobalstatic.h')
-rw-r--r--src/corelib/global/qglobalstatic.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/global/qglobalstatic.h b/src/corelib/global/qglobalstatic.h
index beecc1f000..f758baf15d 100644
--- a/src/corelib/global/qglobalstatic.h
+++ b/src/corelib/global/qglobalstatic.h
@@ -94,8 +94,8 @@ template <typename Holder> struct QGlobalStatic
{
using Type = typename Holder::Type;
- bool isDestroyed() const { return guardValue() <= QtGlobalStatic::Destroyed; }
- bool exists() const { return guardValue() == QtGlobalStatic::Initialized; }
+ bool isDestroyed() const noexcept { return guardValue() <= QtGlobalStatic::Destroyed; }
+ bool exists() const noexcept { return guardValue() == QtGlobalStatic::Initialized; }
operator Type *()
{
if (isDestroyed())
@@ -127,7 +127,7 @@ protected:
static Holder holder;
return holder.pointer();
}
- static QtGlobalStatic::GuardValues guardValue()
+ static QtGlobalStatic::GuardValues guardValue() noexcept
{
return QtGlobalStatic::GuardValues(Holder::guard.loadAcquire());
}