mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
express: make WeakPointerTo cast operators explicit
This prevents accidentally (and unsafely) decaying a WeakPointerTo to a regular pointer.
This commit is contained in:
parent
fb82a1c557
commit
409231d214
@ -38,7 +38,7 @@ public:
|
|||||||
INLINE To &operator *() const;
|
INLINE To &operator *() const;
|
||||||
INLINE To *operator -> () const;
|
INLINE To *operator -> () const;
|
||||||
// MSVC.NET 2005 insists that we use T *, and not To *, here.
|
// MSVC.NET 2005 insists that we use T *, and not To *, here.
|
||||||
INLINE operator T *() const;
|
INLINE explicit operator T *() const;
|
||||||
|
|
||||||
PUBLISHED:
|
PUBLISHED:
|
||||||
INLINE PointerTo<T> lock() const;
|
INLINE PointerTo<T> lock() const;
|
||||||
@ -75,7 +75,7 @@ PUBLISHED:
|
|||||||
public:
|
public:
|
||||||
INLINE const To &operator *() const;
|
INLINE const To &operator *() const;
|
||||||
INLINE const To *operator -> () const;
|
INLINE const To *operator -> () const;
|
||||||
INLINE operator const T *() const;
|
INLINE explicit operator const T *() const;
|
||||||
|
|
||||||
PUBLISHED:
|
PUBLISHED:
|
||||||
INLINE ConstPointerTo<T> lock() const;
|
INLINE ConstPointerTo<T> lock() const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user