aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/memory/qv4heap_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/memory/qv4heap_p.h')
-rw-r--r--src/qml/memory/qv4heap_p.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/qml/memory/qv4heap_p.h b/src/qml/memory/qv4heap_p.h
index 5f931529e9..606fd47cbb 100644
--- a/src/qml/memory/qv4heap_p.h
+++ b/src/qml/memory/qv4heap_p.h
@@ -108,16 +108,15 @@ struct Pointer {
Pointer() {}
Pointer(T *t) : ptr(t) {}
- T *operator->() const { return static_cast<T *>(ptr); }
- operator T *() const { return static_cast<T *>(ptr); }
+ T *operator->() const { return ptr; }
+ operator T *() const { return ptr; }
Pointer &operator =(T *t) { ptr = t; return *this; }
template <typename Type>
Type *cast() { return static_cast<Type *>(ptr); }
- // Use Base, not T here, to ensure T inherits from ptr
- Base *ptr;
+ T *ptr;
};
}