[array] Use hb_swap() in reverse()
This commit is contained in:
parent
87167acfe3
commit
4b3afafb00
|
@ -220,11 +220,8 @@ struct hb_array_t : hb_iter_with_fallback_t<hb_array_t<Type>, Type&>
|
|||
if (end < start + 2)
|
||||
return;
|
||||
|
||||
for (unsigned lhs = start, rhs = end - 1; lhs < rhs; lhs++, rhs--) {
|
||||
Type temp = arrayZ[rhs];
|
||||
arrayZ[rhs] = arrayZ[lhs];
|
||||
arrayZ[lhs] = temp;
|
||||
}
|
||||
for (unsigned lhs = start, rhs = end - 1; lhs < rhs; lhs++, rhs--)
|
||||
hb_swap (arrayZ[rhs], arrayZ[lhs]);
|
||||
}
|
||||
|
||||
hb_array_t sub_array (unsigned int start_offset = 0, unsigned int *seg_count = nullptr /* IN/OUT */) const
|
||||
|
|
Loading…
Reference in New Issue