From 6251d4dafc86bcbec09d1962050af9924249d419 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 30 Jun 2015 22:11:15 +0200 Subject: QtCore: Use Q_NULLPTR instead of 0 in all public headers This is in preparation of adding -Wzero-as-null-pointer-constant (or similar) to the headers check. Task-number: QTBUG-45291 Change-Id: I0cc388ef9faf45cbcf425ad0dc77db3060c104a8 Reviewed-by: Thiago Macieira --- src/corelib/tools/qhash.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/corelib/tools/qhash.h') diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h index 2080a22e23..c83dcaabe1 100644 --- a/src/corelib/tools/qhash.h +++ b/src/corelib/tools/qhash.h @@ -306,7 +306,7 @@ public: typedef T *pointer; typedef T &reference; - inline iterator() : i(0) { } + inline iterator() : i(Q_NULLPTR) { } explicit inline iterator(void *node) : i(reinterpret_cast(node)) { } inline const Key &key() const { return concrete(i)->key; } @@ -363,7 +363,7 @@ public: typedef const T *pointer; typedef const T &reference; - inline const_iterator() : i(0) { } + inline const_iterator() : i(Q_NULLPTR) { } explicit inline const_iterator(void *node) : i(reinterpret_cast(node)) { } #ifdef QT_STRICT_ITERATORS @@ -451,7 +451,7 @@ public: private: void detach_helper(); void freeData(QHashData *d); - Node **findNode(const Key &key, uint *hp = 0) const; + Node **findNode(const Key &key, uint *hp = Q_NULLPTR) const; Node **findNode(const Key &key, uint h) const; Node *createNode(uint h, const Key &key, const T &value, Node **nextNode); void deleteNode(Node *node); @@ -496,7 +496,7 @@ template Q_INLINE_TEMPLATE void QHash::duplicateNode(QHashData::Node *node, void *newNode) { Node *concreteNode = concrete(node); - new (newNode) Node(concreteNode->key, concreteNode->value, concreteNode->h, 0); + new (newNode) Node(concreteNode->key, concreteNode->value, concreteNode->h, Q_NULLPTR); } template -- cgit v1.2.3