[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)
|
if (end < start + 2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (unsigned lhs = start, rhs = end - 1; lhs < rhs; lhs++, rhs--) {
|
for (unsigned lhs = start, rhs = end - 1; lhs < rhs; lhs++, rhs--)
|
||||||
Type temp = arrayZ[rhs];
|
hb_swap (arrayZ[rhs], arrayZ[lhs]);
|
||||||
arrayZ[rhs] = arrayZ[lhs];
|
|
||||||
arrayZ[lhs] = temp;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hb_array_t sub_array (unsigned int start_offset = 0, unsigned int *seg_count = nullptr /* IN/OUT */) const
|
hb_array_t sub_array (unsigned int start_offset = 0, unsigned int *seg_count = nullptr /* IN/OUT */) const
|
||||||
|
|
Loading…
Reference in New Issue