mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-24 16:31:14 +01:00
[vector] Add a missing fast-path
This commit is contained in:
1 parent
41626401b0
commit
0cd98ebbf7
1 file changed
+9
@@ -341,6 +341,15 @@ struct hb_vector_t
|
||||
length = size;
|
||||
}
|
||||
|
||||
template <typename T = Type,
|
||||
hb_enable_if (hb_is_trivially_copyable (T))>
|
||||
void
|
||||
copy_array (hb_array_t<Type> other)
|
||||
{
|
||||
assert ((int) (length + other.length) <= allocated);
|
||||
hb_memcpy ((void *) (arrayZ + length), (const void *) other.arrayZ, other.length * item_size);
|
||||
length += other.length;
|
||||
}
|
||||
template <typename T = Type,
|
||||
hb_enable_if (hb_is_trivially_copyable (T))>
|
||||
void
|
||||
|
||||
Reference in new issue
Block a user