提交 c2c9d204 编写于 作者: B Behdad Esfahbod

Fix double-promotion warnings

Make it an error.
上级 2c7093ed
......@@ -120,10 +120,10 @@ struct fvar
const AxisRecord &axis = get_axes ()[axis_index];
info->tag = axis.axisTag;
info->name_id = axis.axisNameID;
info->default_value = axis.defaultValue / 65536.;
info->default_value = axis.defaultValue / 65536.f;
/* Ensure order, to simplify client math. */
info->min_value = hb_min (info->default_value, axis.minValue / 65536.);
info->max_value = hb_max (info->default_value, axis.maxValue / 65536.);
info->min_value = hb_min (info->default_value, axis.minValue / 65536.f);
info->max_value = hb_max (info->default_value, axis.maxValue / 65536.f);
}
void get_axis_info (unsigned int axis_index,
......@@ -134,10 +134,10 @@ struct fvar
info->tag = axis.axisTag;
info->name_id = axis.axisNameID;
info->flags = (hb_ot_var_axis_flags_t) (unsigned int) axis.flags;
info->default_value = axis.defaultValue / 65536.;
info->default_value = axis.defaultValue / 65536.f;
/* Ensure order, to simplify client math. */
info->min_value = hb_min (info->default_value, axis.minValue / 65536.);
info->max_value = hb_max (info->default_value, axis.maxValue / 65536.);
info->min_value = hb_min (info->default_value, axis.minValue / 65536.f);
info->max_value = hb_max (info->default_value, axis.maxValue / 65536.f);
info->reserved = 0;
}
......
......@@ -65,6 +65,7 @@
#pragma GCC diagnostic error "-Wcast-align"
#pragma GCC diagnostic error "-Wcast-function-type"
#pragma GCC diagnostic error "-Wdelete-non-virtual-dtor"
#pragma GCC diagnostic error "-Wdouble-promotion"
#pragma GCC diagnostic error "-Wformat-security"
#pragma GCC diagnostic error "-Wimplicit-function-declaration"
#pragma GCC diagnostic error "-Winit-self"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册