Fix llvm warnings on Mac
Patch from Scott Fleischman. Warnings were: harfbuzz/src/hb-font-private.hh:121:42: Implicit conversion loses integer precision: 'long long' to 'hb_position_t' (aka 'int') harfbuzz/src/hb-font-private.hh:126:42: Implicit conversion loses integer precision: 'long long' to 'hb_position_t' (aka 'int') harfbuzz/src/hb-font-private.hh:400:85: Implicit conversion loses integer precision: 'long long' to 'hb_position_t' (aka 'int') harfbuzz/src/hb-ot-layout-common-private.hh:1115:37: Implicit conversion loses integer precision: 'long long' to 'int' harfbuzz/src/hb-ft.cc:421:97: Implicit conversion loses integer precision: 'unsigned long long' to 'int' harfbuzz/src/hb-ft.cc:422:97: Implicit conversion loses integer precision: 'unsigned long long' to 'int'
This commit is contained in:
parent
333cc6e2d1
commit
83408cf804
|
@ -118,12 +118,12 @@ struct hb_font_t {
|
|||
/* Convert from parent-font user-space to our user-space */
|
||||
inline hb_position_t parent_scale_x_distance (hb_position_t v) {
|
||||
if (unlikely (parent && parent->x_scale != x_scale))
|
||||
return v * (int64_t) this->x_scale / this->parent->x_scale;
|
||||
return (hb_position_t) (v * (int64_t) this->x_scale / this->parent->x_scale);
|
||||
return v;
|
||||
}
|
||||
inline hb_position_t parent_scale_y_distance (hb_position_t v) {
|
||||
if (unlikely (parent && parent->y_scale != y_scale))
|
||||
return v * (int64_t) this->y_scale / this->parent->y_scale;
|
||||
return (hb_position_t) (v * (int64_t) this->y_scale / this->parent->y_scale);
|
||||
return v;
|
||||
}
|
||||
inline hb_position_t parent_scale_x_position (hb_position_t v) {
|
||||
|
@ -397,7 +397,7 @@ struct hb_font_t {
|
|||
}
|
||||
|
||||
private:
|
||||
inline hb_position_t em_scale (int16_t v, int scale) { return v * (int64_t) scale / face->get_upem (); }
|
||||
inline hb_position_t em_scale (int16_t v, int scale) { return (hb_position_t) (v * (int64_t) scale / face->get_upem ()); }
|
||||
};
|
||||
|
||||
#define HB_SHAPER_DATA_CREATE_FUNC_EXTRA_ARGS
|
||||
|
|
|
@ -418,8 +418,8 @@ hb_ft_font_create (FT_Face ft_face,
|
|||
_hb_ft_get_font_funcs (),
|
||||
ft_face, (hb_destroy_func_t) _do_nothing);
|
||||
hb_font_set_scale (font,
|
||||
((uint64_t) ft_face->size->metrics.x_scale * (uint64_t) ft_face->units_per_EM + (1<<15)) >> 16,
|
||||
((uint64_t) ft_face->size->metrics.y_scale * (uint64_t) ft_face->units_per_EM + (1<<15)) >> 16);
|
||||
(int) (((uint64_t) ft_face->size->metrics.x_scale * (uint64_t) ft_face->units_per_EM + (1<<15)) >> 16),
|
||||
(int) (((uint64_t) ft_face->size->metrics.y_scale * (uint64_t) ft_face->units_per_EM + (1<<15)) >> 16));
|
||||
hb_font_set_ppem (font,
|
||||
ft_face->size->metrics.x_ppem,
|
||||
ft_face->size->metrics.y_ppem);
|
||||
|
|
|
@ -1112,7 +1112,7 @@ struct Device
|
|||
|
||||
if (!pixels) return 0;
|
||||
|
||||
return pixels * (int64_t) scale / ppem;
|
||||
return (int) (pixels * (int64_t) scale / ppem);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue