From 2a5ec0403c9c79239c3a5c3657e0a73948df9227 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 25 May 2012 11:51:48 +0200 Subject: 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 --- src/corelib/tools/qhash.h | 7 ++----- src/corelib/tools/qmap.h | 6 ++---- 2 files changed, 4 insertions(+), 9 deletions(-) (limited to 'src/corelib/tools') 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; }; friend class iterator; -- cgit v1.2.3