From b182e2808af51a04b72951781fe21c3e2301e827 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 4 Dec 2022 12:22:17 -0700 Subject: [PATCH] [bit-set] Don't clear pages when copying set --- src/hb-bit-set.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hb-bit-set.hh b/src/hb-bit-set.hh index 6c4df79c4..76bc524e9 100644 --- a/src/hb-bit-set.hh +++ b/src/hb-bit-set.hh @@ -85,10 +85,10 @@ struct hb_bit_set_t void err () { if (successful) successful = false; } /* TODO Remove */ bool in_error () const { return !successful; } - bool resize (unsigned int count) + bool resize (unsigned int count, bool clear = true) { if (unlikely (!successful)) return false; - if (unlikely (!pages.resize (count) || !page_map.resize (count))) + if (unlikely (!pages.resize (count, clear) || !page_map.resize (count, clear))) { pages.resize (page_map.length); successful = false; @@ -350,7 +350,7 @@ struct hb_bit_set_t { if (unlikely (!successful)) return; unsigned int count = other.pages.length; - if (unlikely (!resize (count))) + if (unlikely (!resize (count, false))) return; population = other.population;