mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-22 07:21:06 +01:00
[vector] Handroll copy
This commit is contained in:
1 parent
1fed366d5b
commit
d2a2f5bf4e
1 file changed
+4
-1
+4
-1
@@ -267,7 +267,10 @@ struct hb_vector_t
|
||||
copy_vector (const hb_vector_t &other)
|
||||
{
|
||||
length = other.length;
|
||||
hb_memcpy ((void *) arrayZ, (const void *) other.arrayZ, length * item_size);
|
||||
/* This runs faster because of alignment. */
|
||||
for (unsigned i = 0; i < length; i++)
|
||||
arrayZ[i] = other.arrayZ[i];
|
||||
//hb_memcpy ((void *) arrayZ, (const void *) other.arrayZ, length * item_size);
|
||||
}
|
||||
template <typename T = Type,
|
||||
hb_enable_if (!hb_is_trivially_copyable (T) &&
|
||||
|
||||
Reference in new issue
Block a user