diff options
author | Kevin Funk <kevin.funk@kdab.com> | 2019-03-12 11:46:26 +0100 |
---|---|---|
committer | Kevin Funk <kevin.funk@kdab.com> | 2019-03-14 07:37:52 +0000 |
commit | 41e7b71c410b77a81d09d3cc2e169ffd7975b4d2 (patch) | |
tree | fd0722a70d1aedf8567cc11babd10adcbbd1e797 /src/corelib/thread/qresultstore.h | |
parent | b35eec360d4d88d094094fb54c101fad6cee5768 (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/thread/qresultstore.h')
-rw-r--r-- | src/corelib/thread/qresultstore.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/thread/qresultstore.h b/src/corelib/thread/qresultstore.h index 1f29e8d187..7a65089396 100644 --- a/src/corelib/thread/qresultstore.h +++ b/src/corelib/thread/qresultstore.h @@ -142,7 +142,7 @@ public: template <typename T> int addResult(int index, const T *result) { - if (result == 0) + if (result == nullptr) return addResult(index, static_cast<void *>(nullptr)); else return addResult(index, static_cast<void *>(new T(*result))); @@ -158,7 +158,7 @@ public: int addResults(int index, const QVector<T> *results, int totalCount) { if (m_filterMode == true && results->count() != totalCount && 0 == results->count()) - return addResults(index, 0, 0, totalCount); + return addResults(index, nullptr, 0, totalCount); else return addResults(index, new QVector<T>(*results), results->count(), totalCount); } |