From 893f57b32f01da3411b5596d59170bc340e9fa39 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 21 Apr 2013 15:21:49 -0400 Subject: [PATCH] Minor renaming --- src/hb-ot-map-private.hh | 10 +++++----- src/hb-ot-map.cc | 22 +++++++++++----------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/hb-ot-map-private.hh b/src/hb-ot-map-private.hh index 66e9b951b..62fd60599 100644 --- a/src/hb-ot-map-private.hh +++ b/src/hb-ot-map-private.hh @@ -68,8 +68,8 @@ struct hb_ot_map_t typedef void (*pause_func_t) (const struct hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer); struct stage_map_t { - unsigned int num_lookups; /* Cumulative */ - pause_func_t callback; + unsigned int last_lookup; /* Cumulative */ + pause_func_t pause_func; }; @@ -111,8 +111,8 @@ struct hb_ot_map_t return; } assert (stage <= stages[table_index].len); - unsigned int start = stage ? stages[table_index][stage - 1].num_lookups : 0; - unsigned int end = stage < stages[table_index].len ? stages[table_index][stage].num_lookups : lookups[table_index].len; + unsigned int start = stage ? stages[table_index][stage - 1].last_lookup : 0; + unsigned int end = stage < stages[table_index].len ? stages[table_index][stage].last_lookup : lookups[table_index].len; *plookups = &lookups[table_index][start]; *lookup_count = end - start; } @@ -215,7 +215,7 @@ struct hb_ot_map_builder_t struct stage_info_t { unsigned int index; - hb_ot_map_t::pause_func_t callback; + hb_ot_map_t::pause_func_t pause_func; }; HB_INTERNAL void add_pause (unsigned int table_index, hb_ot_map_t::pause_func_t pause_func); diff --git a/src/hb-ot-map.cc b/src/hb-ot-map.cc index b907fe14f..39929e097 100644 --- a/src/hb-ot-map.cc +++ b/src/hb-ot-map.cc @@ -109,16 +109,16 @@ void hb_ot_map_t::substitute (const hb_ot_shape_plan_t *plan, hb_font_t *font, h for (unsigned int stage_index = 0; stage_index < stages[table_index].len; stage_index++) { const stage_map_t *stage = &stages[table_index][stage_index]; - for (; i < stage->num_lookups; i++) + for (; i < stage->last_lookup; i++) hb_ot_layout_substitute_lookup (font, buffer, lookups[table_index][i].index, lookups[table_index][i].mask, lookups[table_index][i].auto_zwj); - if (stage->callback) + if (stage->pause_func) { buffer->clear_output (); - stage->callback (plan, font, buffer); + stage->pause_func (plan, font, buffer); } } } @@ -130,13 +130,13 @@ void hb_ot_map_t::position (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_ for (unsigned int stage_index = 0; stage_index < stages[table_index].len; stage_index++) { const stage_map_t *stage = &stages[table_index][stage_index]; - for (; i < stage->num_lookups; i++) + for (; i < stage->last_lookup; i++) hb_ot_layout_position_lookup (font, buffer, lookups[table_index][i].index, lookups[table_index][i].mask, lookups[table_index][i].auto_zwj); - if (stage->callback) - stage->callback (plan, font, buffer); + if (stage->pause_func) + stage->pause_func (plan, font, buffer); } } @@ -151,7 +151,7 @@ void hb_ot_map_builder_t::add_pause (unsigned int table_index, hb_ot_map_t::paus stage_info_t *s = stages[table_index].push (); if (likely (s)) { s->index = current_stage[table_index]; - s->callback = pause_func; + s->pause_func = pause_func; } current_stage[table_index]++; @@ -299,10 +299,10 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m) last_num_lookups = m.lookups[table_index].len; if (stage_index < stages[table_index].len && stages[table_index][stage_index].index == stage) { - hb_ot_map_t::stage_map_t *pause_map = m.stages[table_index].push (); - if (likely (pause_map)) { - pause_map->num_lookups = last_num_lookups; - pause_map->callback = stages[table_index][stage_index].callback; + hb_ot_map_t::stage_map_t *stage_map = m.stages[table_index].push (); + if (likely (stage_map)) { + stage_map->last_lookup = last_num_lookups; + stage_map->pause_func = stages[table_index][stage_index].pause_func; } stage_index++;