mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-24 08:21:32 +01:00
Fix unary minus operator applied to unsigned type, result still unsigned
This commit is contained in:
1 parent
ff46559b67
commit
64ebfa04f2
1 file changed
+4
-4
+4
-4
@@ -678,7 +678,7 @@ hb_ot_get_glyph_v_origins (hb_font_t *font,
|
||||
hb_position_t origin;
|
||||
unsigned cv;
|
||||
if (origin_cache->get (*first_glyph, &cv))
|
||||
origin = font->y_scale < 0 ? -cv : cv;
|
||||
origin = font->y_scale < 0 ? -static_cast<hb_position_t>(cv) : static_cast<hb_position_t>(cv);
|
||||
else
|
||||
{
|
||||
origin = font->em_scalef_y (VORG.get_y_origin (*first_glyph));
|
||||
@@ -702,7 +702,7 @@ hb_ot_get_glyph_v_origins (hb_font_t *font,
|
||||
hb_position_t origin;
|
||||
unsigned cv;
|
||||
if (origin_cache->get (*first_glyph, &cv))
|
||||
origin = font->y_scale < 0 ? -cv : cv;
|
||||
origin = font->y_scale < 0 ? -static_cast<hb_position_t>(cv) : static_cast<hb_position_t>(cv);
|
||||
else
|
||||
{
|
||||
origin = font->em_scalef_y (VORG.get_y_origin (*first_glyph) +
|
||||
@@ -745,7 +745,7 @@ hb_ot_get_glyph_v_origins (hb_font_t *font,
|
||||
hb_position_t origin;
|
||||
unsigned cv;
|
||||
if (origin_cache->get (*first_glyph, &cv))
|
||||
origin = font->y_scale < 0 ? -cv : cv;
|
||||
origin = font->y_scale < 0 ? -static_cast<hb_position_t>(cv) : static_cast<hb_position_t>(cv);
|
||||
else
|
||||
{
|
||||
origin = font->em_scalef_y (glyf.get_v_origin_with_var_unscaled (*first_glyph, font, *scratch, gvar_cache));
|
||||
@@ -779,7 +779,7 @@ hb_ot_get_glyph_v_origins (hb_font_t *font,
|
||||
unsigned cv;
|
||||
|
||||
if (origin_cache->get (*first_glyph, &cv))
|
||||
origin = font->y_scale < 0 ? -cv : cv;
|
||||
origin = font->y_scale < 0 ? -static_cast<hb_position_t>(cv) : static_cast<hb_position_t>(cv);
|
||||
else
|
||||
{
|
||||
hb_glyph_extents_t extents = {0};
|
||||
|
||||
Reference in new issue
Block a user