[otlayout] Minor

This commit is contained in:
Behdad Esfahbod 2013-10-17 13:55:48 +02:00
parent ba6ddc421e
commit 6cc136f753
1 changed files with 6 additions and 8 deletions

View File

@ -752,8 +752,8 @@ static inline bool match_input (hb_apply_context_t *c,
const USHORT input[], /* Array of input values--start with second glyph */ const USHORT input[], /* Array of input values--start with second glyph */
match_func_t match_func, match_func_t match_func,
const void *match_data, const void *match_data,
unsigned int *end_offset = NULL, unsigned int *end_offset,
unsigned int match_positions[MAX_CONTEXT_LENGTH] = NULL, unsigned int match_positions[MAX_CONTEXT_LENGTH],
bool *p_is_mark_ligature = NULL, bool *p_is_mark_ligature = NULL,
unsigned int *p_total_component_count = NULL) unsigned int *p_total_component_count = NULL)
{ {
@ -791,12 +791,11 @@ static inline bool match_input (hb_apply_context_t *c,
unsigned int first_lig_id = get_lig_id (c->buffer->cur()); unsigned int first_lig_id = get_lig_id (c->buffer->cur());
unsigned int first_lig_comp = get_lig_comp (c->buffer->cur()); unsigned int first_lig_comp = get_lig_comp (c->buffer->cur());
if (match_positions)
match_positions[0] = c->buffer->idx; match_positions[0] = c->buffer->idx;
for (unsigned int i = 1; i < count; i++) for (unsigned int i = 1; i < count; i++)
{ {
if (!skippy_iter.next ()) return TRACE_RETURN (false); if (!skippy_iter.next ()) return TRACE_RETURN (false);
if (match_positions)
match_positions[i] = skippy_iter.idx; match_positions[i] = skippy_iter.idx;
unsigned int this_lig_id = get_lig_id (c->buffer->info[skippy_iter.idx]); unsigned int this_lig_id = get_lig_id (c->buffer->info[skippy_iter.idx]);
@ -820,7 +819,6 @@ static inline bool match_input (hb_apply_context_t *c,
total_component_count += get_lig_num_comps (c->buffer->info[skippy_iter.idx]); total_component_count += get_lig_num_comps (c->buffer->info[skippy_iter.idx]);
} }
if (end_offset)
*end_offset = skippy_iter.idx - c->buffer->idx + 1; *end_offset = skippy_iter.idx - c->buffer->idx + 1;
if (p_is_mark_ligature) if (p_is_mark_ligature)