瀏覽代碼

use more explicit casting chain, to maybe help out the Intel compiler

David Rose 14 年之前
父節點
當前提交
4b5d087246
共有 1 個文件被更改,包括 12 次插入12 次删除
  1. 12 12
      panda/src/express/weakPointerTo.I

+ 12 - 12
panda/src/express/weakPointerTo.I

@@ -31,7 +31,7 @@ WeakPointerTo(To *ptr) : WeakPointerToBase<T>(ptr) {
 template<class T>
 template<class T>
 INLINE WeakPointerTo<T>::
 INLINE WeakPointerTo<T>::
 WeakPointerTo(const PointerTo<T> &copy) :
 WeakPointerTo(const PointerTo<T> &copy) :
-  WeakPointerToBase<T>((const PointerToBase<T> &)copy)
+  WeakPointerToBase<T>(*(const PointerToBase<T> *)&copy)
 {
 {
 }
 }
 
 
@@ -43,7 +43,7 @@ WeakPointerTo(const PointerTo<T> &copy) :
 template<class T>
 template<class T>
 INLINE WeakPointerTo<T>::
 INLINE WeakPointerTo<T>::
 WeakPointerTo(const WeakPointerTo<T> &copy) :
 WeakPointerTo(const WeakPointerTo<T> &copy) :
-  WeakPointerToBase<T>((const PointerToBase<T> &)copy)
+  WeakPointerToBase<T>(*(const PointerToBase<T> *)&copy)
 {
 {
 }
 }
 
 
@@ -134,7 +134,7 @@ operator = (To *ptr) {
 template<class T>
 template<class T>
 INLINE WeakPointerTo<T> &WeakPointerTo<T>::
 INLINE WeakPointerTo<T> &WeakPointerTo<T>::
 operator = (const PointerTo<T> &copy) {
 operator = (const PointerTo<T> &copy) {
-  ((WeakPointerTo<T> *)this)->reassign((const PointerToBase<T> &)copy);
+  ((WeakPointerTo<T> *)this)->reassign(*(const PointerToBase<T> *)&copy);
   return *this;
   return *this;
 }
 }
 
 
@@ -146,7 +146,7 @@ operator = (const PointerTo<T> &copy) {
 template<class T>
 template<class T>
 INLINE WeakPointerTo<T> &WeakPointerTo<T>::
 INLINE WeakPointerTo<T> &WeakPointerTo<T>::
 operator = (const WeakPointerTo<T> &copy) {
 operator = (const WeakPointerTo<T> &copy) {
-  ((WeakPointerTo<T> *)this)->reassign((const PointerToBase<T> &)copy);
+  ((WeakPointerTo<T> *)this)->reassign(*(const PointerToBase<T> *)&copy);
   return *this;
   return *this;
 }
 }
 
 
@@ -170,7 +170,7 @@ WeakConstPointerTo(const To *ptr) :
 template<class T>
 template<class T>
 INLINE WeakConstPointerTo<T>::
 INLINE WeakConstPointerTo<T>::
 WeakConstPointerTo(const PointerTo<T> &copy) :
 WeakConstPointerTo(const PointerTo<T> &copy) :
-  WeakPointerToBase<T>((const PointerToBase<T> &)copy)
+  WeakPointerToBase<T>(*(const PointerToBase<T> *)&copy)
 {
 {
 }
 }
 
 
@@ -182,7 +182,7 @@ WeakConstPointerTo(const PointerTo<T> &copy) :
 template<class T>
 template<class T>
 INLINE WeakConstPointerTo<T>::
 INLINE WeakConstPointerTo<T>::
 WeakConstPointerTo(const ConstPointerTo<T> &copy) :
 WeakConstPointerTo(const ConstPointerTo<T> &copy) :
-  WeakPointerToBase<T>((const PointerToBase<T> &)copy)
+  WeakPointerToBase<T>(*(const PointerToBase<T> *)&copy)
 {
 {
 }
 }
 
 
@@ -194,7 +194,7 @@ WeakConstPointerTo(const ConstPointerTo<T> &copy) :
 template<class T>
 template<class T>
 INLINE WeakConstPointerTo<T>::
 INLINE WeakConstPointerTo<T>::
 WeakConstPointerTo(const WeakPointerTo<T> &copy) :
 WeakConstPointerTo(const WeakPointerTo<T> &copy) :
-  WeakPointerToBase<T>((const PointerToBase<T> &)copy)
+  WeakPointerToBase<T>(*(const PointerToBase<T> *)&copy)
 {
 {
 }
 }
 
 
@@ -206,7 +206,7 @@ WeakConstPointerTo(const WeakPointerTo<T> &copy) :
 template<class T>
 template<class T>
 INLINE WeakConstPointerTo<T>::
 INLINE WeakConstPointerTo<T>::
 WeakConstPointerTo(const WeakConstPointerTo<T> &copy) :
 WeakConstPointerTo(const WeakConstPointerTo<T> &copy) :
-  WeakPointerToBase<T>((const PointerToBase<T> &)copy)
+  WeakPointerToBase<T>(*(const PointerToBase<T> *)&copy)
 {
 {
 }
 }
 
 
@@ -298,7 +298,7 @@ operator = (const To *ptr) {
 template<class T>
 template<class T>
 INLINE WeakConstPointerTo<T> &WeakConstPointerTo<T>::
 INLINE WeakConstPointerTo<T> &WeakConstPointerTo<T>::
 operator = (const PointerTo<T> &copy) {
 operator = (const PointerTo<T> &copy) {
-  ((WeakConstPointerTo<T> *)this)->reassign((const PointerToBase<T> &)copy);
+  ((WeakConstPointerTo<T> *)this)->reassign(*(const PointerToBase<T> *)&copy);
   return *this;
   return *this;
 }
 }
 
 
@@ -310,7 +310,7 @@ operator = (const PointerTo<T> &copy) {
 template<class T>
 template<class T>
 INLINE WeakConstPointerTo<T> &WeakConstPointerTo<T>::
 INLINE WeakConstPointerTo<T> &WeakConstPointerTo<T>::
 operator = (const ConstPointerTo<T> &copy) {
 operator = (const ConstPointerTo<T> &copy) {
-  ((WeakConstPointerTo<T> *)this)->reassign((const PointerToBase<T> &)copy);
+  ((WeakConstPointerTo<T> *)this)->reassign(*(const PointerToBase<T> *)&copy);
   return *this;
   return *this;
 }
 }
 
 
@@ -322,7 +322,7 @@ operator = (const ConstPointerTo<T> &copy) {
 template<class T>
 template<class T>
 INLINE WeakConstPointerTo<T> &WeakConstPointerTo<T>::
 INLINE WeakConstPointerTo<T> &WeakConstPointerTo<T>::
 operator = (const WeakPointerTo<T> &copy) {
 operator = (const WeakPointerTo<T> &copy) {
-  ((WeakConstPointerTo<T> *)this)->reassign((const PointerToBase<T> &)copy);
+  ((WeakConstPointerTo<T> *)this)->reassign(*(const PointerToBase<T> *)&copy);
   return *this;
   return *this;
 }
 }
 
 
@@ -334,6 +334,6 @@ operator = (const WeakPointerTo<T> &copy) {
 template<class T>
 template<class T>
 INLINE WeakConstPointerTo<T> &WeakConstPointerTo<T>::
 INLINE WeakConstPointerTo<T> &WeakConstPointerTo<T>::
 operator = (const WeakConstPointerTo<T> &copy) {
 operator = (const WeakConstPointerTo<T> &copy) {
-  ((WeakConstPointerTo<T> *)this)->reassign((const PointerToBase<T> &)copy);
+  ((WeakConstPointerTo<T> *)this)->reassign(*(const PointerToBase<T> *)&copy);
   return *this;
   return *this;
 }
 }