diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-05-25 11:51:48 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-31 17:57:50 +0200 |
commit | 2a5ec0403c9c79239c3a5c3657e0a73948df9227 (patch) | |
tree | a06dd23c823dd29a63c37a6f606f4af8511eede3 | |
parent | 6a6fd56e662b2c1a581727f7ec44d5bd60913ad4 (diff) |
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>
-rw-r--r-- | src/corelib/tools/qhash.h | 7 | ||||
-rw-r--r-- | src/corelib/tools/qmap.h | 6 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h index 93af8f63d5..c0e2e6eff5 100644 --- a/src/corelib/tools/qhash.h +++ b/src/corelib/tools/qhash.h @@ -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; diff --git a/src/corelib/tools/qmap.h b/src/corelib/tools/qmap.h index 3494bd0c4c..9cab1035d1 100644 --- a/src/corelib/tools/qmap.h +++ b/src/corelib/tools/qmap.h @@ -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; |