@@ -46,8 +46,6 @@ template<typename T, typename M> class Persistent :
46
46
, WeakCallbackType type);
47
47
48
48
private:
49
- inline T *operator *() const { return *PersistentBase<T>::persistent; }
50
-
51
49
template <typename S, typename M2>
52
50
inline void Copy (const Persistent<S, M2> &that) {
53
51
TYPE_CHECK (T, S);
@@ -94,8 +92,8 @@ class Global : public v8::Global<T> {
94
92
P *parameter
95
93
, typename WeakCallbackInfo<P>::Callback callback
96
94
, WeakCallbackType type) {
97
- reinterpret_cast <Persistent<T>*>(this )-> SetWeak (
98
- parameter, callback, type);
95
+ static_cast <Persistent<T>*>(static_cast <v8::PersistentBase<T>*>( this ))->
96
+ SetWeak ( parameter, callback, type);
99
97
}
100
98
};
101
99
#else
@@ -130,7 +128,8 @@ class Global : public v8::UniquePersistent<T> {
130
128
131
129
#if NODE_MODULE_VERSION == NODE_0_12_MODULE_VERSION
132
130
inline void Empty () {
133
- reinterpret_cast <v8::Persistent<T>*>(this )->ClearAndLeak ();
131
+ static_cast <v8::Persistent<T>*>(static_cast <v8::PersistentBase<T>*>(this ))->
132
+ ClearAndLeak ();
134
133
}
135
134
#endif
136
135
@@ -139,13 +138,14 @@ class Global : public v8::UniquePersistent<T> {
139
138
# if NODE_MODULE_VERSION > NODE_0_12_MODULE_VERSION
140
139
rvalue.object_ ->Empty ();
141
140
# else
142
- reinterpret_cast <v8::Persistent<T>*>(rvalue.object_ )->ClearAndLeak ();
141
+ static_cast <v8::Persistent<T>*>(static_cast <v8::PersistentBase<T>*>(
142
+ rvalue.object_ ))->ClearAndLeak ();
143
143
# endif
144
144
}
145
145
146
146
template <typename S>
147
147
inline Global &operator =(v8::UniquePersistent<S> other) {
148
- return reinterpret_cast <Global>(v8::UniquePersistent<S>::operator =(other));
148
+ return static_cast <Global& >(v8::UniquePersistent<S>::operator =(other));
149
149
}
150
150
151
151
inline operator RValue () { return RValue (this ); }
@@ -157,8 +157,8 @@ class Global : public v8::UniquePersistent<T> {
157
157
P *parameter
158
158
, typename WeakCallbackInfo<P>::Callback callback
159
159
, WeakCallbackType type) {
160
- reinterpret_cast <Persistent<T>*>(this )-> SetWeak (
161
- parameter, callback, type);
160
+ static_cast <Persistent<T>*>(static_cast <v8::PersistentBase<T>*>( this ))
161
+ -> SetWeak ( parameter, callback, type);
162
162
}
163
163
};
164
164
#endif
0 commit comments