From ea8e784146664f807dc19a6273dc7651627a06ff Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Tue, 30 Jun 2020 12:54:29 +0430 Subject: [PATCH] [fvar] Improve naming --- src/hb-ot-var-fvar-table.hh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/hb-ot-var-fvar-table.hh b/src/hb-ot-var-fvar-table.hh index c1b9cd4d9..8a5809c06 100644 --- a/src/hb-ot-var-fvar-table.hh +++ b/src/hb-ot-var-fvar-table.hh @@ -82,7 +82,7 @@ struct AxisRecord { info->tag = axisTag; info->name_id = axisNameID; - fill_values (info->default_value, info->min_value, info->max_value); + get_coordinates (info->min_value, info->default_value, info->max_value); } #endif @@ -92,14 +92,14 @@ struct AxisRecord info->tag = axisTag; info->name_id = axisNameID; info->flags = (hb_ot_var_axis_flags_t) (unsigned int) flags; - fill_values (info->default_value, info->min_value, info->max_value); + get_coordinates (info->min_value, info->default_value, info->max_value); info->reserved = 0; } int normalize_axis_value (float v) const { - float default_value, min_value, max_value; - fill_values (default_value, min_value, max_value); + float min_value, default_value, max_value; + get_coordinates (min_value, default_value, max_value); v = hb_clamp (v, min_value, max_value); @@ -114,8 +114,8 @@ struct AxisRecord float unnormalize_axis_value (int v) const { - float default_value, min_value, max_value; - fill_values (default_value, min_value, max_value); + float min_value, default_value, max_value; + get_coordinates (min_value, default_value, max_value); if (v == 0) return default_value; @@ -134,12 +134,12 @@ struct AxisRecord } protected: - void fill_values (float &default_value, float &min_value, float &max_value) const + void get_coordinates (float &min, float &default_, float &max) const { - default_value = defaultValue / 65536.f; + default_ = defaultValue / 65536.f; /* Ensure order, to simplify client math. */ - min_value = hb_min (default_value, minValue / 65536.f); - max_value = hb_max (default_value, maxValue / 65536.f); + min = hb_min (default_, minValue / 65536.f); + max = hb_max (default_, maxValue / 65536.f); } protected: