From 801298b590effd768607bb532dc83c73ba65d16b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 8 Aug 2012 14:26:36 -0400 Subject: [PATCH] Fix cast https://bugs.freedesktop.org/show_bug.cgi?id=53233 --- src/hb-buffer-private.hh | 10 ++++++---- src/hb-shape-plan.cc | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/hb-buffer-private.hh b/src/hb-buffer-private.hh index c96723a..9864ca2 100644 --- a/src/hb-buffer-private.hh +++ b/src/hb-buffer-private.hh @@ -64,14 +64,16 @@ hb_segment_properties_equal (const hb_segment_properties_t *a, } -static inline long +#if 0 +static inline unsigned int hb_segment_properties_hash (const hb_segment_properties_t *p) { /* TODO improve */ - return (long) p->direction + - (long) p->script + - (long) p->language; + return (unsigned int) p->direction + + (unsigned int) p->script + + (intptr_t) (p->language); } +#endif diff --git a/src/hb-shape-plan.cc b/src/hb-shape-plan.cc index ddfb501..f7a78e4 100644 --- a/src/hb-shape-plan.cc +++ b/src/hb-shape-plan.cc @@ -190,11 +190,11 @@ hb_shape_plan_execute (hb_shape_plan *shape_plan, */ #if 0 -static long +static unsigned int hb_shape_plan_hash (const hb_shape_plan_t *shape_plan) { return hb_segment_properties_hash (&shape_plan->props) + - shape_plan->default_shaper_list ? 0 : (long) shape_plan->shaper_func; + shape_plan->default_shaper_list ? 0 : (intptr_t) shape_plan->shaper_func; } #endif -- 2.7.4