From b13017e6519cbeaddca8d751624ab7403a8a51dc Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 9 Feb 2025 08:00:18 +0000 Subject: [PATCH] Use HB_ALWAYS_INLINE instead of bare __attribute__ The former works on MSVC too. --- src/hb-buffer.hh | 12 ++++++------ src/hb-set-digest.hh | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/hb-buffer.hh b/src/hb-buffer.hh index a341b5504..77210ad11 100644 --- a/src/hb-buffer.hh +++ b/src/hb-buffer.hh @@ -183,19 +183,19 @@ struct hb_buffer_t allocated_var_bits = 0; } - __attribute__((always_inline)) + HB_ALWAYS_INLINE hb_glyph_info_t &cur (unsigned int i = 0) { return info[idx + i]; } - __attribute__((always_inline)) + HB_ALWAYS_INLINE hb_glyph_info_t cur (unsigned int i = 0) const { return info[idx + i]; } - __attribute__((always_inline)) + HB_ALWAYS_INLINE hb_glyph_position_t &cur_pos (unsigned int i = 0) { return pos[idx + i]; } - __attribute__((always_inline)) + HB_ALWAYS_INLINE hb_glyph_position_t cur_pos (unsigned int i = 0) const { return pos[idx + i]; } - __attribute__((always_inline)) + HB_ALWAYS_INLINE hb_glyph_info_t &prev () { return out_info[out_len ? out_len - 1 : 0]; } - __attribute__((always_inline)) + HB_ALWAYS_INLINE hb_glyph_info_t prev () const { return out_info[out_len ? out_len - 1 : 0]; } template diff --git a/src/hb-set-digest.hh b/src/hb-set-digest.hh index 5b14c74f6..0d05e72c1 100644 --- a/src/hb-set-digest.hh +++ b/src/hb-set-digest.hh @@ -150,7 +150,7 @@ struct hb_set_digest_t masks[i] |= one << ((g >> hb_set_digest_shifts[i]) & mb1); } - __attribute__((always_inline)) + HB_ALWAYS_INLINE bool may_have (hb_codepoint_t g) const { for (unsigned i = 0; i < n; i++)