From 0a38878549968e1d636a6d878c55d4efe76ce9fc Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 25 Mar 2022 09:42:36 -0600 Subject: [PATCH] [set] Minor touch-up on the previous commit --- docs/harfbuzz-sections.txt | 1 + src/hb-bit-set-invertible.hh | 10 +++++----- src/hb-bit-set.hh | 12 ++++++------ src/hb-set.cc | 6 +++--- src/hb-set.hh | 4 ++-- 5 files changed, 17 insertions(+), 16 deletions(-) diff --git a/docs/harfbuzz-sections.txt b/docs/harfbuzz-sections.txt index a73f995b6..46ab75207 100644 --- a/docs/harfbuzz-sections.txt +++ b/docs/harfbuzz-sections.txt @@ -658,6 +658,7 @@ hb_set_is_equal hb_set_is_subset hb_set_next hb_set_next_range +hb_set_next_many hb_set_previous hb_set_previous_range hb_set_reference diff --git a/src/hb-bit-set-invertible.hh b/src/hb-bit-set-invertible.hh index 8dab90f56..4a4ce3405 100644 --- a/src/hb-bit-set-invertible.hh +++ b/src/hb-bit-set-invertible.hh @@ -323,12 +323,12 @@ struct hb_bit_set_invertible_t return true; } - unsigned int set_next_many (hb_codepoint_t codepoint, - hb_codepoint_t *out, - unsigned int size) const + unsigned int next_many (hb_codepoint_t codepoint, + hb_codepoint_t *out, + unsigned int size) const { - return inverted ? s.set_next_many_inverted(codepoint, out, size) - : s.set_next_many(codepoint, out, size); + return inverted ? s.next_many_inverted (codepoint, out, size) + : s.next_many (codepoint, out, size); } static constexpr hb_codepoint_t INVALID = hb_bit_set_t::INVALID; diff --git a/src/hb-bit-set.hh b/src/hb-bit-set.hh index 0d7ca3f6d..fcaff9f3b 100644 --- a/src/hb-bit-set.hh +++ b/src/hb-bit-set.hh @@ -700,9 +700,9 @@ struct hb_bit_set_t return true; } - unsigned int set_next_many (hb_codepoint_t codepoint, - hb_codepoint_t *out, - unsigned int size) const + unsigned int next_many (hb_codepoint_t codepoint, + hb_codepoint_t *out, + unsigned int size) const { // By default, start at the first bit of the first page of values. unsigned int start_page = 0; @@ -740,9 +740,9 @@ struct hb_bit_set_t return initial_size - size; } - unsigned int set_next_many_inverted (hb_codepoint_t codepoint, - hb_codepoint_t *out, - unsigned int size) const + unsigned int next_many_inverted (hb_codepoint_t codepoint, + hb_codepoint_t *out, + unsigned int size) const { unsigned int initial_size = size; // By default, start at the first bit of the first page of values. diff --git a/src/hb-set.cc b/src/hb-set.cc index 3146d6ffb..a5fca3fd5 100644 --- a/src/hb-set.cc +++ b/src/hb-set.cc @@ -619,8 +619,8 @@ hb_set_previous_range (const hb_set_t *set, * hb_set_next_many: * @set: A set * @codepoint: Outputting codepoints starting after this one. - * Use HB_SET_VALUE_INVALID to get started. - * @out: An array of codepoints to write to. + * Use #HB_SET_VALUE_INVALID to get started. + * @out: (array length=size) An array of codepoints to write to. * @size: The maximum number of codepoints to write out. * * Finds the next element in @set that is greater than @codepoint. Writes out @@ -637,5 +637,5 @@ hb_set_next_many (const hb_set_t *set, hb_codepoint_t *out, unsigned int size) { - return set->set_next_many (codepoint, out, size); + return set->next_many (codepoint, out, size); } diff --git a/src/hb-set.hh b/src/hb-set.hh index 5668b4ad0..1f0540786 100644 --- a/src/hb-set.hh +++ b/src/hb-set.hh @@ -139,8 +139,8 @@ struct hb_sparseset_t { return s.next_range (first, last); } bool previous_range (hb_codepoint_t *first, hb_codepoint_t *last) const { return s.previous_range (first, last); } - unsigned int set_next_many (hb_codepoint_t codepoint, hb_codepoint_t *out, unsigned int size) const - { return s.set_next_many(codepoint, out, size); } + unsigned int next_many (hb_codepoint_t codepoint, hb_codepoint_t *out, unsigned int size) const + { return s.next_many (codepoint, out, size); } unsigned int get_population () const { return s.get_population (); } hb_codepoint_t get_min () const { return s.get_min (); }