From 11d03f1ff973bb1a0731cdf6302d1587185c347a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 26 May 2021 14:26:05 -0600 Subject: [PATCH] [set] Mark a couple methods as constexpr --- src/hb-set.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-set.hh b/src/hb-set.hh index 073ba95dd..be036b3a9 100644 --- a/src/hb-set.hh +++ b/src/hb-set.hh @@ -57,7 +57,7 @@ struct hb_set_t void init0 () { v.clear (); } void init1 () { v.clear (0xFF); } - unsigned int len () const + constexpr unsigned len () const { return ARRAY_LENGTH_CONST (v); } bool is_empty () const @@ -70,7 +70,7 @@ struct hb_set_t void add (hb_codepoint_t g) { elt (g) |= mask (g); } void del (hb_codepoint_t g) { elt (g) &= ~mask (g); } - bool get (hb_codepoint_t g) const { return elt (g) & mask (g); } + constexpr bool get (hb_codepoint_t g) const { return elt (g) & mask (g); } void add_range (hb_codepoint_t a, hb_codepoint_t b) {