mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-13 08:42:59 +00:00
[vector] Add a missing fast-path
This commit is contained in:
parent
41626401b0
commit
0cd98ebbf7
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue