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>bb10
parent
27a0ec9b9a
commit
6d95497931
|
|
@ -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){}
|
||||
|
|
|
|||
Loading…
Reference in New Issue