From e0ffebead6230b8e1ee8dd97425505706321793e Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Wed, 14 Feb 2018 16:01:08 -0800 Subject: [PATCH] [subset] In hb-subset-test use hb_set_union instead of manually copying set. --- test/api/hb-subset-test.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/api/hb-subset-test.h b/test/api/hb-subset-test.h index efae1797..de7f274f 100644 --- a/test/api/hb-subset-test.h +++ b/test/api/hb-subset-test.h @@ -90,16 +90,14 @@ hb_subset_test_open_font (const char *font_path) static inline hb_face_t * hb_subset_test_create_subset (hb_face_t *source, - hb_set_t *codepoints) + const hb_set_t *codepoints) { hb_subset_profile_t *profile = hb_subset_profile_create(); hb_subset_input_t *input = hb_subset_input_create_or_fail (); hb_set_t * input_codepoints = hb_subset_input_unicode_set (input); - hb_codepoint_t codepoint = -1; - while (hb_set_next (codepoints, &codepoint)) { - hb_set_add (input_codepoints, codepoint); - } + + hb_set_union (input_codepoints, codepoints); hb_face_t *subset = hb_subset (source, profile, input); g_assert (subset); -- GitLab