Browse Source

fix warning on win32

David Rose 21 years ago
parent
commit
0392b84e23
1 changed files with 7 additions and 7 deletions
  1. 7 7
      panda/src/express/weakPointerToBase.I

+ 7 - 7
panda/src/express/weakPointerToBase.I

@@ -113,7 +113,7 @@ reassign(const PointerToBase<To> &copy) {
   // This double-casting is a bit of a cheat to get around the
   // This double-casting is a bit of a cheat to get around the
   // inheritance issue--it's difficult to declare a template class to
   // inheritance issue--it's difficult to declare a template class to
   // be a friend.
   // be a friend.
-  reassign((To *)((const WeakPointerToBase<To> &)copy)._void_ptr);
+  reassign((To *)((const WeakPointerToBase<To> *)&copy)->_void_ptr);
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -302,7 +302,7 @@ operator >= (const WeakPointerToBase<To> &other) const {
 template<class T>
 template<class T>
 INLINE bool WeakPointerToBase<T>::
 INLINE bool WeakPointerToBase<T>::
 operator == (const PointerToBase<To> &other) const {
 operator == (const PointerToBase<To> &other) const {
-  return (To *)_void_ptr == (To *)((WeakPointerToBase<To> &)other)._void_ptr;
+  return (To *)_void_ptr == (To *)((WeakPointerToBase<To> *)&other)->_void_ptr;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -313,7 +313,7 @@ operator == (const PointerToBase<To> &other) const {
 template<class T>
 template<class T>
 INLINE bool WeakPointerToBase<T>::
 INLINE bool WeakPointerToBase<T>::
 operator != (const PointerToBase<To> &other) const {
 operator != (const PointerToBase<To> &other) const {
-  return (To *)_void_ptr != (To *)((WeakPointerToBase<To> &)other)._void_ptr;
+  return (To *)_void_ptr != (To *)((WeakPointerToBase<To> *)&other)->_void_ptr;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -324,7 +324,7 @@ operator != (const PointerToBase<To> &other) const {
 template<class T>
 template<class T>
 INLINE bool WeakPointerToBase<T>::
 INLINE bool WeakPointerToBase<T>::
 operator > (const PointerToBase<To> &other) const {
 operator > (const PointerToBase<To> &other) const {
-  return (To *)_void_ptr > (To *)((WeakPointerToBase<To> &)other)._void_ptr;
+  return (To *)_void_ptr > (To *)((WeakPointerToBase<To> *)&other)->_void_ptr;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -335,7 +335,7 @@ operator > (const PointerToBase<To> &other) const {
 template<class T>
 template<class T>
 INLINE bool WeakPointerToBase<T>::
 INLINE bool WeakPointerToBase<T>::
 operator <= (const PointerToBase<To> &other) const {
 operator <= (const PointerToBase<To> &other) const {
-  return (To *)_void_ptr <= (To *)((WeakPointerToBase<To> &)other)._void_ptr;
+  return (To *)_void_ptr <= (To *)((WeakPointerToBase<To> *)&other)->_void_ptr;
 }
 }
 
 
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
@@ -346,7 +346,7 @@ operator <= (const PointerToBase<To> &other) const {
 template<class T>
 template<class T>
 INLINE bool WeakPointerToBase<T>::
 INLINE bool WeakPointerToBase<T>::
 operator >= (const PointerToBase<To> &other) const {
 operator >= (const PointerToBase<To> &other) const {
-  return (To *)_void_ptr >= (To *)((WeakPointerToBase<To> &)other)._void_ptr;
+  return (To *)_void_ptr >= (To *)((WeakPointerToBase<To> *)&other)->_void_ptr;
 }
 }
 #endif  // WIN32_VC
 #endif  // WIN32_VC
 
 
@@ -380,7 +380,7 @@ operator < (const WeakPointerToBase<To> &other) const {
 template<class T>
 template<class T>
 INLINE bool WeakPointerToBase<T>::
 INLINE bool WeakPointerToBase<T>::
 operator < (const PointerToBase<To> &other) const {
 operator < (const PointerToBase<To> &other) const {
-  return (To *)_void_ptr < (To *)((WeakPointerToBase<To> &)other)._void_ptr;
+  return (To *)_void_ptr < (To *)((WeakPointerToBase<To> *)&other)->_void_ptr;
 }
 }
 
 
 #endif  // CPPPARSER
 #endif  // CPPPARSER