From 9daa88cd790b80a8bc7eaae2e7eec6f2f9fc60cf Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 14 Dec 2017 13:37:48 -0800 Subject: [PATCH] Minor --- src/hb-set-private.hh | 11 +++++++++++ src/hb-set.cc | 6 ++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/hb-set-private.hh b/src/hb-set-private.hh index c9305ec9..95c15449 100644 --- a/src/hb-set-private.hh +++ b/src/hb-set-private.hh @@ -184,6 +184,17 @@ struct hb_set_t hb_prealloced_array_t page_map; hb_prealloced_array_t pages; + inline void init (void) + { + page_map.init (); + pages.init (); + } + inline void finish (void) + { + page_map.finish (); + pages.finish (); + } + inline bool resize (unsigned int count) { if (unlikely (in_error)) return false; diff --git a/src/hb-set.cc b/src/hb-set.cc index e2c78822..0b4f871e 100644 --- a/src/hb-set.cc +++ b/src/hb-set.cc @@ -45,8 +45,7 @@ hb_set_create (void) if (!(set = hb_object_create ())) return hb_set_get_empty (); - set->page_map.init (); - set->pages.init (); + set->init (); return set; } @@ -96,8 +95,7 @@ hb_set_destroy (hb_set_t *set) { if (!hb_object_destroy (set)) return; - set->page_map.finish (); - set->pages.finish (); + set->finish (); free (set); } -- GitLab