From d6fdae310f2a98ca624c3a77c3aa03b8b3bd393a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 3 Nov 2018 16:02:03 -0400 Subject: [PATCH] Add operator char * to hb_nonnull_ptr_t --- src/hb-null.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hb-null.hh b/src/hb-null.hh index a3f0ea079..c91af1636 100644 --- a/src/hb-null.hh +++ b/src/hb-null.hh @@ -120,10 +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; } - template - inline operator C * (void) { return get (); } - template - inline operator const C * (void) const { return get (); } + template inline operator C * (void) { return get (); } + template inline operator const C * (void) const { return get (); } + inline operator char * (void) { return (char *) get (); } + inline operator const char * (void) const { return (const char *) get (); } inline T * get (void) { return v ? v : const_cast (&Null(T)); } inline const T * get (void) const { return v ? v : const_cast (&Null(T)); } inline T * get_raw (void) { return v; }