mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -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;
|
||||
// MSVC.NET 2005 insists that we use T *, and not To *, here.
|
||||
INLINE operator T *() const;
|
||||
INLINE explicit operator T *() const;
|
||||
|
||||
PUBLISHED:
|
||||
INLINE PointerTo<T> lock() const;
|
||||
@ -75,7 +75,7 @@ PUBLISHED:
|
||||
public:
|
||||
INLINE const To &operator *() const;
|
||||
INLINE const To *operator -> () const;
|
||||
INLINE operator const T *() const;
|
||||
INLINE explicit operator const T *() const;
|
||||
|
||||
PUBLISHED:
|
||||
INLINE ConstPointerTo<T> lock() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user