[vector] Adjust for HB_OPTIMIZE_SIZE
This commit is contained in:
parent
1d474194f0
commit
7b197446ac
|
@ -267,10 +267,13 @@ struct hb_vector_t
|
||||||
copy_vector (const hb_vector_t &other)
|
copy_vector (const hb_vector_t &other)
|
||||||
{
|
{
|
||||||
length = other.length;
|
length = other.length;
|
||||||
|
#ifndef HB_OPTIMIZE_SIZE
|
||||||
/* This runs faster because of alignment. */
|
/* This runs faster because of alignment. */
|
||||||
for (unsigned i = 0; i < length; i++)
|
for (unsigned i = 0; i < length; i++)
|
||||||
arrayZ[i] = other.arrayZ[i];
|
arrayZ[i] = other.arrayZ[i];
|
||||||
//hb_memcpy ((void *) arrayZ, (const void *) other.arrayZ, length * item_size);
|
#else
|
||||||
|
hb_memcpy ((void *) arrayZ, (const void *) other.arrayZ, length * item_size);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
template <typename T = Type,
|
template <typename T = Type,
|
||||||
hb_enable_if (!hb_is_trivially_copyable (T) &&
|
hb_enable_if (!hb_is_trivially_copyable (T) &&
|
||||||
|
|
Loading…
Reference in New Issue