Enabled operator->() for class QValueListIterator.

pull/2/head
Michele Calgaro 11 years ago
parent 7fface8931
commit 5747da54c6

@ -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 QValueListNode
{
@ -112,8 +108,8 @@ class QValueListIterator
bool operator!=( const QValueListIterator<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; }
QValueListIterator<T>& operator++() {
node = node->next;

Loading…
Cancel
Save