diff --git a/panda/src/express/nodePointerTo.I b/panda/src/express/nodePointerTo.I index da103e59f2..ede270a231 100644 --- a/panda/src/express/nodePointerTo.I +++ b/panda/src/express/nodePointerTo.I @@ -83,7 +83,7 @@ operator -> () const { //////////////////////////////////////////////////////////////////// template INLINE NodePointerTo:: -operator TYPENAME NodePointerToBase::To *() const { +operator T *() const { return (To *)(this->_void_ptr); } @@ -205,7 +205,7 @@ operator -> () const { template INLINE NodeConstPointerTo:: -operator const TYPENAME NodePointerToBase::To *() const { +operator const T * () const { return (To *)(this->_void_ptr); } diff --git a/panda/src/express/nodePointerTo.h b/panda/src/express/nodePointerTo.h index aa1e7fb4d3..7f1d4a6091 100644 --- a/panda/src/express/nodePointerTo.h +++ b/panda/src/express/nodePointerTo.h @@ -39,7 +39,9 @@ public: INLINE To &operator *() const; INLINE To *operator -> () const; - INLINE operator TYPENAME NodePointerToBase::To *() const; + + // MSVC.NET 2005 insists that we use T *, and not To *, here. + INLINE operator T *() const; INLINE To *p() const; @@ -64,7 +66,7 @@ public: INLINE const To &operator *() const; INLINE const To *operator -> () const; - INLINE operator const TYPENAME NodePointerToBase::To *() const; + INLINE operator const T *() const; INLINE const To *p() const; diff --git a/panda/src/express/pointerTo.I b/panda/src/express/pointerTo.I index edc1739146..775c4b7b01 100644 --- a/panda/src/express/pointerTo.I +++ b/panda/src/express/pointerTo.I @@ -83,7 +83,7 @@ operator -> () const { //////////////////////////////////////////////////////////////////// template INLINE PointerTo:: -operator TYPENAME PointerToBase::To *() const { +operator T * () const { return (To *)(this->_void_ptr); } @@ -205,8 +205,8 @@ operator -> () const { template INLINE ConstPointerTo:: -operator const TYPENAME PointerToBase::To *() const { - return (To *)(this->_void_ptr); +operator const T * () const { +return (To *)(this->_void_ptr); } //////////////////////////////////////////////////////////////////// diff --git a/panda/src/express/pointerTo.h b/panda/src/express/pointerTo.h index f7e2db2a57..d3b0b845d6 100644 --- a/panda/src/express/pointerTo.h +++ b/panda/src/express/pointerTo.h @@ -90,7 +90,8 @@ PUBLISHED: public: INLINE To &operator *() const; INLINE To *operator -> () const; - INLINE operator TYPENAME PointerToBase::To *() const; + // MSVC.NET 2005 insists that we use T *, and not To *, here. + INLINE operator T *() const; PUBLISHED: // When downcasting to a derived class from a PointerTo, @@ -148,7 +149,7 @@ PUBLISHED: public: INLINE const To &operator *() const; INLINE const To *operator -> () const; - INLINE operator const TYPENAME PointerToBase::To *() const; + INLINE operator const T *() const; PUBLISHED: INLINE const To *p() const; diff --git a/panda/src/express/threadSafePointerTo.I b/panda/src/express/threadSafePointerTo.I index 3b012483d0..41d12ac084 100644 --- a/panda/src/express/threadSafePointerTo.I +++ b/panda/src/express/threadSafePointerTo.I @@ -83,7 +83,7 @@ operator -> () const { //////////////////////////////////////////////////////////////////// template INLINE ThreadSafePointerTo:: -operator TYPENAME ThreadSafePointerToBase::To *() const { +operator T * () const { return (To *)AtomicAdjust::get_ptr(this->_void_ptr); } @@ -205,7 +205,7 @@ operator -> () const { template INLINE ThreadSafeConstPointerTo:: -operator const TYPENAME ThreadSafePointerToBase::To *() const { +operator const T * () const { return (To *)AtomicAdjust::get_ptr(this->_void_ptr); } diff --git a/panda/src/express/threadSafePointerTo.h b/panda/src/express/threadSafePointerTo.h index 806707c655..66bcebbfc7 100644 --- a/panda/src/express/threadSafePointerTo.h +++ b/panda/src/express/threadSafePointerTo.h @@ -42,7 +42,8 @@ PUBLISHED: public: INLINE To &operator *() const; INLINE To *operator -> () const; - INLINE operator TYPENAME ThreadSafePointerToBase::To *() const; + // MSVC.NET 2005 insists that we use T *, and not To *, here. + INLINE operator T *() const; PUBLISHED: // When downcasting to a derived class from a ThreadSafePointerTo, @@ -89,7 +90,7 @@ PUBLISHED: public: INLINE const To &operator *() const; INLINE const To *operator -> () const; - INLINE operator const TYPENAME ThreadSafePointerToBase::To *() const; + INLINE operator const T *() const; PUBLISHED: INLINE const To *p() const; diff --git a/panda/src/express/weakPointerTo.I b/panda/src/express/weakPointerTo.I index 03d968b350..8c4bcbd239 100644 --- a/panda/src/express/weakPointerTo.I +++ b/panda/src/express/weakPointerTo.I @@ -87,7 +87,7 @@ operator -> () const { //////////////////////////////////////////////////////////////////// template INLINE WeakPointerTo:: -operator TYPENAME WeakPointerToBase::To *() const { +operator T * () const { nassertr(!this->was_deleted(), (To *)NULL); return (To *)WeakPointerToBase::_void_ptr; } @@ -251,7 +251,7 @@ operator -> () const { template INLINE WeakConstPointerTo:: -operator const TYPENAME WeakPointerToBase::To *() const { +operator const T * () const { nassertr(!this->was_deleted(), (To *)NULL); return (To *)WeakPointerToBase::_void_ptr; } diff --git a/panda/src/express/weakPointerTo.h b/panda/src/express/weakPointerTo.h index d236dcb097..90a19d6c64 100644 --- a/panda/src/express/weakPointerTo.h +++ b/panda/src/express/weakPointerTo.h @@ -44,7 +44,8 @@ PUBLISHED: public: INLINE To &operator *() const; INLINE To *operator -> () const; - INLINE operator TYPENAME WeakPointerToBase::To *() const; + // MSVC.NET 2005 insists that we use T *, and not To *, here. + INLINE operator T *() const; PUBLISHED: INLINE To *p() const; @@ -82,7 +83,7 @@ PUBLISHED: public: INLINE const To &operator *() const; INLINE const To *operator -> () const; - INLINE operator const TYPENAME WeakPointerToBase::To *() const; + INLINE operator const T *() const; PUBLISHED: INLINE const To *p() const;