From 01d06e34ffa746d3737df00bb692cdb1e859c1c6 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 16 Dec 2018 14:27:43 -0500 Subject: [PATCH] Minor change to explicit_operator aesthetics --- src/hb-iter.hh | 2 +- src/hb-machinery.hh | 2 +- src/hb-vector.hh | 4 ++-- src/hb.hh | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/hb-iter.hh b/src/hb-iter.hh index 64260f842..b697ef990 100644 --- a/src/hb-iter.hh +++ b/src/hb-iter.hh @@ -72,7 +72,7 @@ struct Iter array (array_), length (length_) {} /* Emptiness. */ - explicit_operator operator bool (void) const { return bool (length); } + explicit_operator bool (void) const { return bool (length); } /* Current item. */ T &operator * (void) diff --git a/src/hb-machinery.hh b/src/hb-machinery.hh index 2702eb4cb..d761db638 100644 --- a/src/hb-machinery.hh +++ b/src/hb-machinery.hh @@ -834,7 +834,7 @@ struct hb_lazy_loader_t : hb_data_wrapper_t const Returned * operator -> (void) const { return get (); } const Returned & operator * (void) const { return *get (); } - explicit_operator operator bool (void) const + explicit_operator bool (void) const { return get_stored () != Funcs::get_null (); } template operator const C * (void) const { return get (); } diff --git a/src/hb-vector.hh b/src/hb-vector.hh index 6f202ea20..ba9d1419f 100644 --- a/src/hb-vector.hh +++ b/src/hb-vector.hh @@ -121,8 +121,8 @@ struct hb_vector_t hb_array_t sorted_sub_array (unsigned int start_offset, unsigned int *count = nullptr /* IN/OUT */) { return as_sorted_array ().sorted_sub_array (start_offset, count);} - template explicit_operator operator T * (void) { return arrayZ(); } - template explicit_operator operator const T * (void) const { return arrayZ(); } + template explicit_operator T * (void) { return arrayZ(); } + template explicit_operator const T * (void) const { return arrayZ(); } operator hb_array_t (void) { return as_array (); } operator hb_array_t (void) const { as_array (); } diff --git a/src/hb.hh b/src/hb.hh index 6df0a55b1..e4b9a8148 100644 --- a/src/hb.hh +++ b/src/hb.hh @@ -137,14 +137,14 @@ struct _hb_alignof /* https://github.com/harfbuzz/harfbuzz/issues/1127 */ #ifndef explicit_operator -#define explicit_operator +#define explicit_operator operator #endif #else /* __cplusplus >= 201103L */ /* https://github.com/harfbuzz/harfbuzz/issues/1127 */ #ifndef explicit_operator -#define explicit_operator explicit +#define explicit_operator explicit operator #endif #endif /* __cplusplus < 201103L */