From ff776a3059b25f8dd3c3abbd6aa8ffa95ec9cf7a Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 20 Oct 2020 11:42:50 +0200 Subject: Whitespace cleanup in corelib/global Change-Id: I087d7d949cfd43e48e8a008621a4eeaa9d104ceb Reviewed-by: Thiago Macieira --- src/corelib/global/qglobalstatic.h | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'src/corelib/global/qglobalstatic.h') diff --git a/src/corelib/global/qglobalstatic.h b/src/corelib/global/qglobalstatic.h index e56fe1dbcb..a0dfd462fd 100644 --- a/src/corelib/global/qglobalstatic.h +++ b/src/corelib/global/qglobalstatic.h @@ -132,17 +132,29 @@ struct QGlobalStatic bool isDestroyed() const { return guard.loadRelaxed() <= QtGlobalStatic::Destroyed; } bool exists() const { return guard.loadRelaxed() == QtGlobalStatic::Initialized; } - operator Type *() { if (isDestroyed()) return nullptr; return innerFunction(); } - Type *operator()() { if (isDestroyed()) return nullptr; return innerFunction(); } + operator Type *() + { + if (isDestroyed()) + return nullptr; + return innerFunction(); + } + Type *operator()() + { + if (isDestroyed()) + return nullptr; + return innerFunction(); + } Type *operator->() { - Q_ASSERT_X(!isDestroyed(), "Q_GLOBAL_STATIC", "The global static was used after being destroyed"); - return innerFunction(); + Q_ASSERT_X(!isDestroyed(), "Q_GLOBAL_STATIC", + "The global static was used after being destroyed"); + return innerFunction(); } Type &operator*() { - Q_ASSERT_X(!isDestroyed(), "Q_GLOBAL_STATIC", "The global static was used after being destroyed"); - return *innerFunction(); + Q_ASSERT_X(!isDestroyed(), "Q_GLOBAL_STATIC", + "The global static was used after being destroyed"); + return *innerFunction(); } }; -- cgit v1.2.3