diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2014-03-17 19:00:08 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2014-03-17 19:00:08 +0900 |
commit | 67ff892b7336c7f295366419bd517af06ae78cff (patch) | |
tree | 33a4122d3431af42b8a4adefd73f1e3f50ef0921 /src | |
parent | d41055e21eb31f1013258fd7d2db2f0c2ef08ddc (diff) | |
download | tqt3-67ff892b7336c7f295366419bd517af06ae78cff.tar.gz tqt3-67ff892b7336c7f295366419bd517af06ae78cff.zip |
Enabled operator->() for class QValueListIterator.
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/ntqvaluelist.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/tools/ntqvaluelist.h b/src/tools/ntqvaluelist.h index fd14437b5..9ee9ee5e5 100644 --- a/src/tools/ntqvaluelist.h +++ b/src/tools/ntqvaluelist.h @@ -55,10 +55,6 @@ //#define QT_CHECK_VALUELIST_RANGE -#if defined(Q_CC_MSVC) -#pragma warning(disable:4284) // "return type for operator -> is not a UDT" -#endif - template <class T> class TQValueListNode { @@ -112,8 +108,8 @@ class TQValueListIterator bool operator!=( const TQValueListIterator<T>& it ) const { return node != it.node; } const T& operator*() const { return node->data; } T& operator*() { return node->data; } - // UDT for T = x* - // T* operator->() const { return &node->data; } + const T* operator->() const { return &node->data; } + T* operator->() { return &node->data; } TQValueListIterator<T>& operator++() { node = node->next; |