mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-23 07:51:10 +01:00
Template casts in hb_nonnull_ptr_t
This commit is contained in:
1 parent
da408fce98
commit
7430ff604a
1 file changed
+4
-2
+4
-2
@@ -120,8 +120,10 @@ struct hb_nonnull_ptr_t
|
||||
inline const T & operator * (void) const { return *get (); }
|
||||
inline T ** operator & (void) { return &v; }
|
||||
inline const T ** operator & (void) const { return &v; }
|
||||
inline operator T * (void) { return get (); }
|
||||
inline operator const T * (void) const { return get (); }
|
||||
template <typename C>
|
||||
inline operator C * (void) { return get (); }
|
||||
template <typename C>
|
||||
inline operator const C * (void) const { return get (); }
|
||||
inline T * get (void) { return v ? v : const_cast<T *> (&Null(T)); }
|
||||
inline const T * get (void) const { return v ? v : const_cast<T *> (&Null(T)); }
|
||||
inline T * get_raw (void) { return v; }
|
||||
|
||||
Reference in new issue
Block a user