Remove the unnecessary comment about operator== not being necessary
The mysterious comment was just suggesting that they weren't necessary. Turns out the comment is wrong: they are necessary for non-strict iterator modes. Task-number: QTBUG-25063 Change-Id: I20ada17035642ee656c431d6bf2152a5243cecdb Reviewed-by: Olivier Goffart <ogoffart@woboq.com>bb10
parent
6a6fd56e66
commit
2a5ec0403c
|
|
@ -378,16 +378,13 @@ public:
|
|||
inline iterator &operator+=(int j) { return *this = *this + j; }
|
||||
inline iterator &operator-=(int j) { return *this = *this - j; }
|
||||
|
||||
// ### Qt 5: not sure this is necessary anymore
|
||||
#ifdef QT_STRICT_ITERATORS
|
||||
private:
|
||||
#else
|
||||
#ifndef QT_STRICT_ITERATORS
|
||||
public:
|
||||
#endif
|
||||
inline bool operator==(const const_iterator &o) const
|
||||
{ return i == o.i; }
|
||||
inline bool operator!=(const const_iterator &o) const
|
||||
{ return i != o.i; }
|
||||
#endif
|
||||
};
|
||||
friend class iterator;
|
||||
|
||||
|
|
|
|||
|
|
@ -435,15 +435,13 @@ public:
|
|||
inline iterator &operator+=(int j) { return *this = *this + j; }
|
||||
inline iterator &operator-=(int j) { return *this = *this - j; }
|
||||
|
||||
#ifdef QT_STRICT_ITERATORS
|
||||
private:
|
||||
#else
|
||||
#ifndef QT_STRICT_ITERATORS
|
||||
public:
|
||||
#endif
|
||||
inline bool operator==(const const_iterator &o) const
|
||||
{ return i == o.i; }
|
||||
inline bool operator!=(const const_iterator &o) const
|
||||
{ return i != o.i; }
|
||||
#endif
|
||||
friend class QMap<Key, T>;
|
||||
};
|
||||
friend class iterator;
|
||||
|
|
|
|||
Loading…
Reference in New Issue