summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorKevin Funk <kevin.funk@kdab.com>2019-03-12 11:46:26 +0100
committerKevin Funk <kevin.funk@kdab.com>2019-03-14 07:37:52 +0000
commit41e7b71c410b77a81d09d3cc2e169ffd7975b4d2 (patch)
treefd0722a70d1aedf8567cc11babd10adcbbd1e797 /src/corelib/global
parentb35eec360d4d88d094094fb54c101fad6cee5768 (diff)
More nullptr usage in headers
Diff generated by running clang-tidy's modernize-use-nullptr checker on the CMake-based Qt version. Skipping src/3rdparty, examples/, tests/ Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qglobalstatic.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/global/qglobalstatic.h b/src/corelib/global/qglobalstatic.h
index 555bdf04c1..93d71cee57 100644
--- a/src/corelib/global/qglobalstatic.h
+++ b/src/corelib/global/qglobalstatic.h
@@ -131,8 +131,8 @@ struct QGlobalStatic
bool isDestroyed() const { return guard.load() <= QtGlobalStatic::Destroyed; }
bool exists() const { return guard.load() == QtGlobalStatic::Initialized; }
- operator Type *() { if (isDestroyed()) return 0; return innerFunction(); }
- Type *operator()() { if (isDestroyed()) return 0; 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");