summaryrefslogtreecommitdiffstats
path: root/src/tools/qvaluelist.h
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2014-03-17 18:59:06 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2014-03-17 18:59:06 +0900
commit5747da54c67e79a326622b3367b28bb15f9774d6 (patch)
treebe74d323092aefe9cdaf1932d62b3002fa2c4f25 /src/tools/qvaluelist.h
parent7fface8931ec9cf0f4c15286bc9a34fcff102bf6 (diff)
downloadqt3-5747da54c67e79a326622b3367b28bb15f9774d6.tar.gz
qt3-5747da54c67e79a326622b3367b28bb15f9774d6.zip
Enabled operator->() for class QValueListIterator.
Diffstat (limited to 'src/tools/qvaluelist.h')
-rw-r--r--src/tools/qvaluelist.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/tools/qvaluelist.h b/src/tools/qvaluelist.h
index b082097..9365cd8 100644
--- a/src/tools/qvaluelist.h
+++ b/src/tools/qvaluelist.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 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;