[HarfBuzz] harfbuzz: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Thu May 21 14:01:46 PDT 2015


 src/hb-ot-font.cc |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f1b44303df0712b433e35e1e1e75115c353b279e
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu May 21 14:00:15 2015 -0700

    Fix unary minus operator applied to unsigned int
    
    Applying unary minus operator to unsigned int causes the following
    warning on MSVS:
    
      warning C4146: unary minus operator applied to unsigned type, result still unsigned
    
    Based on patch from Koji Ishi.
    
    Fixes https://github.com/behdad/harfbuzz/pull/110

diff --git a/src/hb-ot-font.cc b/src/hb-ot-font.cc
index 30dcdd4..3656a45 100644
--- a/src/hb-ot-font.cc
+++ b/src/hb-ot-font.cc
@@ -220,7 +220,7 @@ hb_ot_get_glyph_v_advance (hb_font_t *font HB_UNUSED,
 			   void *user_data HB_UNUSED)
 {
   const hb_ot_font_t *ot_font = (const hb_ot_font_t *) font_data;
-  return font->em_scale_y (-ot_font->v_metrics.get_advance (glyph));
+  return font->em_scale_y (-(int) ot_font->v_metrics.get_advance (glyph));
 }
 
 static hb_bool_t


More information about the HarfBuzz mailing list