[fvar] minor simplification

This commit is contained in:
Ebrahim Byagowi 2020-06-21 01:36:16 +04:30
parent 4e37c48e37
commit 82ec9ef2e9
1 changed files with 4 additions and 6 deletions

View File

@ -146,10 +146,9 @@ struct fvar
{
if (axes_count)
{
hb_array_t<const AxisRecord> arr = hb_array (&(this+firstAxis), axisCount).sub_array (start_offset, axes_count);
const AxisRecord *axes = get_axes ();
hb_array_t<const AxisRecord> arr = get_axes ().sub_array (start_offset, axes_count);
for (unsigned i = 0; i < arr.length; ++i)
axes[start_offset + i].get_axis_deprecated (&axes_array[i]);
arr[i].get_axis_deprecated (&axes_array[i]);
}
return axisCount;
}
@ -161,10 +160,9 @@ struct fvar
{
if (axes_count)
{
hb_array_t<const AxisRecord> arr = hb_array (&(this+firstAxis), axisCount).sub_array (start_offset, axes_count);
const AxisRecord *axes = get_axes ();
hb_array_t<const AxisRecord> arr = get_axes ().sub_array (start_offset, axes_count);
for (unsigned i = 0; i < arr.length; ++i)
axes[start_offset + i].get_axis_info (start_offset + i, &axes_array[i]);
arr[i].get_axis_info (start_offset + i, &axes_array[i]);
}
return axisCount;
}