From 0cd98ebbf78cf7ba5e7a43b1a864b23e5e0189ca Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 25 Feb 2025 18:53:04 -0700 Subject: [PATCH] [vector] Add a missing fast-path --- src/hb-vector.hh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/hb-vector.hh b/src/hb-vector.hh index 809f2d842..5eb02bc8e 100644 --- a/src/hb-vector.hh +++ b/src/hb-vector.hh @@ -341,6 +341,15 @@ struct hb_vector_t length = size; } + template + void + copy_array (hb_array_t other) + { + assert ((int) (length + other.length) <= allocated); + hb_memcpy ((void *) (arrayZ + length), (const void *) other.arrayZ, other.length * item_size); + length += other.length; + } template void