From bee93e269711a3eda4e7d762b730522564fe6e87 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 9 Oct 2018 08:01:49 -0400 Subject: [PATCH] Add const to get_*_advances API Ouch! --- src/hb-font.cc | 10 +++++----- src/hb-font.h | 8 ++++---- src/hb-font.hh | 6 +++--- src/hb-ft.cc | 2 +- src/hb-ot-font.cc | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/hb-font.cc b/src/hb-font.cc index f4f2df7c7..fa5e6614b 100644 --- a/src/hb-font.cc +++ b/src/hb-font.cc @@ -179,7 +179,7 @@ static void hb_font_get_glyph_h_advances_default (hb_font_t* font, void* font_data HB_UNUSED, unsigned int count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned int glyph_stride, hb_position_t *first_advance, unsigned int advance_stride, @@ -211,7 +211,7 @@ static void hb_font_get_glyph_v_advances_default (hb_font_t* font, void* font_data HB_UNUSED, unsigned int count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned int glyph_stride, hb_position_t *first_advance, unsigned int advance_stride, @@ -808,7 +808,7 @@ hb_font_get_glyph_v_advance (hb_font_t *font, void hb_font_get_glyph_h_advances (hb_font_t* font, unsigned count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride) @@ -826,7 +826,7 @@ hb_font_get_glyph_h_advances (hb_font_t* font, void hb_font_get_glyph_v_advances (hb_font_t* font, unsigned count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride) @@ -1053,7 +1053,7 @@ HB_EXTERN void hb_font_get_glyph_advances_for_direction (hb_font_t* font, hb_direction_t direction, unsigned count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride) diff --git a/src/hb-font.h b/src/hb-font.h index e13b0916a..48450e99d 100644 --- a/src/hb-font.h +++ b/src/hb-font.h @@ -134,7 +134,7 @@ typedef hb_font_get_glyph_advance_func_t hb_font_get_glyph_v_advance_func_t; typedef void (*hb_font_get_glyph_advances_func_t) (hb_font_t* font, void* font_data, unsigned count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride, @@ -424,14 +424,14 @@ hb_font_get_glyph_v_advance (hb_font_t *font, HB_EXTERN void hb_font_get_glyph_h_advances (hb_font_t* font, unsigned count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride); HB_EXTERN void hb_font_get_glyph_v_advances (hb_font_t* font, unsigned count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride); @@ -487,7 +487,7 @@ HB_EXTERN void hb_font_get_glyph_advances_for_direction (hb_font_t* font, hb_direction_t direction, unsigned count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride); diff --git a/src/hb-font.hh b/src/hb-font.hh index 8b19dd715..47f5261e8 100644 --- a/src/hb-font.hh +++ b/src/hb-font.hh @@ -237,7 +237,7 @@ struct hb_font_t } inline void get_glyph_h_advances (unsigned int count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned int glyph_stride, hb_position_t *first_advance, unsigned int advance_stride) @@ -250,7 +250,7 @@ struct hb_font_t } inline void get_glyph_v_advances (unsigned int count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned int glyph_stride, hb_position_t *first_advance, unsigned int advance_stride) @@ -378,7 +378,7 @@ struct hb_font_t } inline void get_glyph_advances_for_direction (hb_direction_t direction, unsigned count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride) diff --git a/src/hb-ft.cc b/src/hb-ft.cc index fcd87a078..79ce8f49a 100644 --- a/src/hb-ft.cc +++ b/src/hb-ft.cc @@ -221,7 +221,7 @@ hb_ft_get_variation_glyph (hb_font_t *font HB_UNUSED, static void hb_ft_get_glyph_h_advances (hb_font_t* font, void* font_data, unsigned count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride, diff --git a/src/hb-ot-font.cc b/src/hb-ot-font.cc index 582083979..686c873dd 100644 --- a/src/hb-ot-font.cc +++ b/src/hb-ot-font.cc @@ -66,7 +66,7 @@ hb_ot_get_variation_glyph (hb_font_t *font HB_UNUSED, static void hb_ot_get_glyph_h_advances (hb_font_t* font, void* font_data, unsigned count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride, @@ -86,7 +86,7 @@ hb_ot_get_glyph_h_advances (hb_font_t* font, void* font_data, static void hb_ot_get_glyph_v_advances (hb_font_t* font, void* font_data, unsigned count, - hb_codepoint_t *first_glyph, + const hb_codepoint_t *first_glyph, unsigned glyph_stride, hb_position_t *first_advance, unsigned advance_stride,