[buffer] Inline revers_range() / reverse()
This commit is contained in:
parent
5914acb3cb
commit
4cd96e73e4
|
@ -395,29 +395,6 @@ hb_buffer_t::set_masks (hb_mask_t value,
|
||||||
info[i].mask = (info[i].mask & not_mask) | value;
|
info[i].mask = (info[i].mask & not_mask) | value;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
hb_buffer_t::reverse_range (unsigned int start,
|
|
||||||
unsigned int end)
|
|
||||||
{
|
|
||||||
if (end - start < 2)
|
|
||||||
return;
|
|
||||||
|
|
||||||
hb_array_t<hb_glyph_info_t> (info, len).reverse (start, end);
|
|
||||||
|
|
||||||
if (have_positions) {
|
|
||||||
hb_array_t<hb_glyph_position_t> (pos, len).reverse (start, end);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
hb_buffer_t::reverse ()
|
|
||||||
{
|
|
||||||
if (unlikely (!len))
|
|
||||||
return;
|
|
||||||
|
|
||||||
reverse_range (0, len);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
hb_buffer_t::reverse_clusters ()
|
hb_buffer_t::reverse_clusters ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -201,8 +201,14 @@ struct hb_buffer_t
|
||||||
unsigned int cluster);
|
unsigned int cluster);
|
||||||
HB_INTERNAL void add_info (const hb_glyph_info_t &glyph_info);
|
HB_INTERNAL void add_info (const hb_glyph_info_t &glyph_info);
|
||||||
|
|
||||||
HB_INTERNAL void reverse_range (unsigned int start, unsigned int end);
|
void reverse_range (unsigned start, unsigned end)
|
||||||
HB_INTERNAL void reverse ();
|
{
|
||||||
|
hb_array_t<hb_glyph_info_t> (info, len).reverse (start, end);
|
||||||
|
if (have_positions)
|
||||||
|
hb_array_t<hb_glyph_position_t> (pos, len).reverse (start, end);
|
||||||
|
}
|
||||||
|
void reverse () { reverse_range (0, len); }
|
||||||
|
|
||||||
HB_INTERNAL void reverse_clusters ();
|
HB_INTERNAL void reverse_clusters ();
|
||||||
HB_INTERNAL void guess_segment_properties ();
|
HB_INTERNAL void guess_segment_properties ();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue