QGlobalStatic: mark functions that inspect the guard noexcept
Because they are. Pick-to: 6.3 Change-Id: I60e94ebbe6fcd624195aeaed5de76cabc61c3178 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>bb10
parent
b0e4d53b63
commit
01dab0b953
|
|
@ -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());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue