From c55bf55154887ae485501bf8843e26abb5cdedaa Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 29 Jun 2020 02:04:16 -0700 Subject: [PATCH] Remove HB_CONST_FUNC and HB_PURE_FUNC They are not necessary for inline functions. --- src/hb-algs.hh | 6 +++--- src/hb-face.hh | 2 +- src/hb.hh | 4 ---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/hb-algs.hh b/src/hb-algs.hh index fc6ba15d5..05c98ef20 100644 --- a/src/hb-algs.hh +++ b/src/hb-algs.hh @@ -537,7 +537,7 @@ HB_FUNCOBJ (hb_clamp); /* Return the number of 1 bits in v. */ template -static inline HB_CONST_FUNC unsigned int +static inline unsigned int hb_popcount (T v) { #if (defined(__GNUC__) && (__GNUC__ >= 4)) || defined(__clang__) @@ -578,7 +578,7 @@ hb_popcount (T v) /* Returns the number of bits needed to store number */ template -static inline HB_CONST_FUNC unsigned int +static inline unsigned int hb_bit_storage (T v) { if (unlikely (!v)) return 0; @@ -652,7 +652,7 @@ hb_bit_storage (T v) /* Returns the number of zero bits in the least significant side of v */ template -static inline HB_CONST_FUNC unsigned int +static inline unsigned int hb_ctz (T v) { if (unlikely (!v)) return 8 * sizeof (T); diff --git a/src/hb-face.hh b/src/hb-face.hh index f1b472ccf..765f27285 100644 --- a/src/hb-face.hh +++ b/src/hb-face.hh @@ -81,7 +81,7 @@ struct hb_face_t return blob; } - HB_PURE_FUNC unsigned int get_upem () const + unsigned int get_upem () const { unsigned int ret = upem.get_relaxed (); if (unlikely (!ret)) diff --git a/src/hb.hh b/src/hb.hh index 0033215a4..4a7a834c8 100644 --- a/src/hb.hh +++ b/src/hb.hh @@ -245,12 +245,8 @@ extern "C" void hb_free_impl(void *ptr); #endif #if defined(__GNUC__) && (__GNUC__ >= 3) -#define HB_PURE_FUNC __attribute__((pure)) -#define HB_CONST_FUNC __attribute__((const)) #define HB_PRINTF_FUNC(format_idx, arg_idx) __attribute__((__format__ (__printf__, format_idx, arg_idx))) #else -#define HB_PURE_FUNC -#define HB_CONST_FUNC #define HB_PRINTF_FUNC(format_idx, arg_idx) #endif #if defined(__GNUC__) && (__GNUC__ >= 4) || (__clang__)