diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-07 13:05:48 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-07 23:02:47 +0200 |
commit | 564b59d903683b14c75b72a3e93367717f201def (patch) | |
tree | 03ffe749d83dce84429a7db484bf92795047036f /tests/auto/corelib/tools/collections | |
parent | b5fc1e4e2643e73d3b44c483d159529f8deb8af1 (diff) |
Another round of replacing 0 with nullptr
This time based on grepping to also include documentation, tests and
examples previously missed by the automatic tool.
Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'tests/auto/corelib/tools/collections')
-rw-r--r-- | tests/auto/corelib/tools/collections/tst_collections.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/auto/corelib/tools/collections/tst_collections.cpp b/tests/auto/corelib/tools/collections/tst_collections.cpp index e5cfb0fbad..1e01c5a484 100644 --- a/tests/auto/corelib/tools/collections/tst_collections.cpp +++ b/tests/auto/corelib/tools/collections/tst_collections.cpp @@ -812,7 +812,7 @@ void tst_Collections::vector() QVERIFY(LargeStatic::count == originalLargeStaticCount); { QVector<LargeStatic> vector; - LargeStatic *dummy = 0; + LargeStatic *dummy = nullptr; for (int i = 0; i < 10000; ++i) { delete dummy; dummy = new LargeStatic; @@ -834,7 +834,7 @@ void tst_Collections::vector() QVERIFY(Movable::count == originalMovableCount); { QVector<Movable> vector; - Movable *dummy = 0; + Movable *dummy = nullptr; for (int i = 0; i < 10000; ++i) { delete dummy; dummy = new Movable; @@ -2583,7 +2583,7 @@ void tst_Collections::list_stl() } template <typename T> -T qtInit(T * = 0) +T qtInit(T * = nullptr) { return T(); } @@ -2593,9 +2593,9 @@ void tst_Collections::q_init() QCOMPARE(qtInit<int>(), 0); QCOMPARE(qtInit<double>(), 0.0); QCOMPARE(qtInit<QString>(), QString()); - QCOMPARE(qtInit<int *>(), static_cast<int *>(0)); - QCOMPARE(qtInit<double *>(), static_cast<double *>(0)); - QCOMPARE(qtInit<QString *>(), static_cast<QString *>(0)); + QCOMPARE(qtInit<int *>(), static_cast<int *>(nullptr)); + QCOMPARE(qtInit<double *>(), static_cast<double *>(nullptr)); + QCOMPARE(qtInit<QString *>(), static_cast<QString *>(nullptr)); QCOMPARE(qtInit<Pod>().i1, 0); QCOMPARE(qtInit<Pod>().i2, 0); } |