aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/memory/qv4heap_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-02-14 23:22:23 +0100
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-04-24 15:20:51 +0000
commit68d74b67da1c14045e04ff13d7cd1bce8ea8d622 (patch)
tree0c4b3e096946dc5533a70b72466532a77353f516 /src/qml/memory/qv4heap_p.h
parent0a499043fbaccc0a83ba59f81f64993552d7b13b (diff)
Use Heap::Pointer in more places
Change-Id: I2a64aadcd47ed05ad7d08a70a5d765d898a671fd Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
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;
};
}