diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-08-16 09:48:53 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-08-16 13:36:15 +0000 |
commit | 6d9549793137f779bdb136897385cdc59b65e44e (patch) | |
tree | d17ae01f0a7058c2454ad5b011ef609d4301693b /src/corelib/tools | |
parent | 27a0ec9b9a9984741d9ea7e8d88e5bca5fe95693 (diff) |
QLinkedList: compile with -Wzero-as-null-pointer-constant
The existing header check unfortunately doesn't detect uses of
'0' as nullptr in template code.
Task-number: QTBUG-45291
Change-Id: Ibe701402d95deca98c5286e2cee5f7118fd7f606
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qlinkedlist.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qlinkedlist.h b/src/corelib/tools/qlinkedlist.h index 710bf5a9f2..44d9ae9439 100644 --- a/src/corelib/tools/qlinkedlist.h +++ b/src/corelib/tools/qlinkedlist.h @@ -128,7 +128,7 @@ public: typedef T *pointer; typedef T &reference; Node *i; - inline iterator() : i(0) {} + inline iterator() : i(Q_NULLPTR) {} inline iterator(Node *n) : i(n) {} inline iterator(const iterator &o) : i(o.i) {} inline iterator &operator=(const iterator &o) { i = o.i; return *this; } @@ -161,7 +161,7 @@ public: typedef const T *pointer; typedef const T &reference; Node *i; - inline const_iterator() : i(0) {} + inline const_iterator() : i(Q_NULLPTR) {} inline const_iterator(Node *n) : i(n) {} inline const_iterator(const const_iterator &o) : i(o.i){} inline const_iterator(iterator ci) : i(ci.i){} |