m[vowels] Simplify
If we didn't "process" anything, swap_buffers() becomes a no-op.
This commit is contained in:
parent
3b91e0b592
commit
0f61a6213a
@ -200,7 +200,6 @@ print (' * collected from the USE script development spec.')
|
||||
print (' *')
|
||||
print (' * https://github.com/harfbuzz/harfbuzz/issues/1019')
|
||||
print (' */')
|
||||
print (' bool processed = false;')
|
||||
print (' buffer->clear_output ();')
|
||||
print (' unsigned int count = buffer->len;')
|
||||
print (' switch ((unsigned) buffer->props.script)')
|
||||
@ -215,15 +214,13 @@ for script, constraints in sorted (constraints.items (), key=lambda s_c: script_
|
||||
print ('\tbuffer->next_glyph ();')
|
||||
print ('\tif (matched) _output_with_dotted_circle (buffer);')
|
||||
print (' }')
|
||||
print (' processed = true;')
|
||||
print (' break;')
|
||||
print ()
|
||||
|
||||
print (' default:')
|
||||
print (' break;')
|
||||
print (' }')
|
||||
print (' if (processed)')
|
||||
print (' buffer->swap_buffers ();')
|
||||
print (' buffer->swap_buffers ();')
|
||||
print ('}')
|
||||
|
||||
print ()
|
||||
|
@ -51,7 +51,6 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
||||
*
|
||||
* https://github.com/harfbuzz/harfbuzz/issues/1019
|
||||
*/
|
||||
bool processed = false;
|
||||
buffer->clear_output ();
|
||||
unsigned int count = buffer->len;
|
||||
switch ((unsigned) buffer->props.script)
|
||||
@ -105,7 +104,6 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
||||
buffer->next_glyph ();
|
||||
if (matched) _output_with_dotted_circle (buffer);
|
||||
}
|
||||
processed = true;
|
||||
break;
|
||||
|
||||
case HB_SCRIPT_BENGALI:
|
||||
@ -127,7 +125,6 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
||||
buffer->next_glyph ();
|
||||
if (matched) _output_with_dotted_circle (buffer);
|
||||
}
|
||||
processed = true;
|
||||
break;
|
||||
|
||||
case HB_SCRIPT_GURMUKHI:
|
||||
@ -164,7 +161,6 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
||||
buffer->next_glyph ();
|
||||
if (matched) _output_with_dotted_circle (buffer);
|
||||
}
|
||||
processed = true;
|
||||
break;
|
||||
|
||||
case HB_SCRIPT_GUJARATI:
|
||||
@ -189,7 +185,6 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
||||
buffer->next_glyph ();
|
||||
if (matched) _output_with_dotted_circle (buffer);
|
||||
}
|
||||
processed = true;
|
||||
break;
|
||||
|
||||
case HB_SCRIPT_ORIYA:
|
||||
@ -208,7 +203,6 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
||||
buffer->next_glyph ();
|
||||
if (matched) _output_with_dotted_circle (buffer);
|
||||
}
|
||||
processed = true;
|
||||
break;
|
||||
|
||||
case HB_SCRIPT_TAMIL:
|
||||
@ -223,7 +217,6 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
||||
buffer->next_glyph ();
|
||||
if (matched) _output_with_dotted_circle (buffer);
|
||||
}
|
||||
processed = true;
|
||||
break;
|
||||
|
||||
case HB_SCRIPT_TELUGU:
|
||||
@ -247,7 +240,6 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
||||
buffer->next_glyph ();
|
||||
if (matched) _output_with_dotted_circle (buffer);
|
||||
}
|
||||
processed = true;
|
||||
break;
|
||||
|
||||
case HB_SCRIPT_KANNADA:
|
||||
@ -266,7 +258,6 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
||||
buffer->next_glyph ();
|
||||
if (matched) _output_with_dotted_circle (buffer);
|
||||
}
|
||||
processed = true;
|
||||
break;
|
||||
|
||||
case HB_SCRIPT_MALAYALAM:
|
||||
@ -293,7 +284,6 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
||||
buffer->next_glyph ();
|
||||
if (matched) _output_with_dotted_circle (buffer);
|
||||
}
|
||||
processed = true;
|
||||
break;
|
||||
|
||||
case HB_SCRIPT_SINHALA:
|
||||
@ -329,7 +319,6 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
||||
buffer->next_glyph ();
|
||||
if (matched) _output_with_dotted_circle (buffer);
|
||||
}
|
||||
processed = true;
|
||||
break;
|
||||
|
||||
case HB_SCRIPT_BRAHMI:
|
||||
@ -351,7 +340,6 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
||||
buffer->next_glyph ();
|
||||
if (matched) _output_with_dotted_circle (buffer);
|
||||
}
|
||||
processed = true;
|
||||
break;
|
||||
|
||||
case HB_SCRIPT_KHUDAWADI:
|
||||
@ -373,7 +361,6 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
||||
buffer->next_glyph ();
|
||||
if (matched) _output_with_dotted_circle (buffer);
|
||||
}
|
||||
processed = true;
|
||||
break;
|
||||
|
||||
case HB_SCRIPT_TIRHUTA:
|
||||
@ -400,7 +387,6 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
||||
buffer->next_glyph ();
|
||||
if (matched) _output_with_dotted_circle (buffer);
|
||||
}
|
||||
processed = true;
|
||||
break;
|
||||
|
||||
case HB_SCRIPT_MODI:
|
||||
@ -421,7 +407,6 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
||||
buffer->next_glyph ();
|
||||
if (matched) _output_with_dotted_circle (buffer);
|
||||
}
|
||||
processed = true;
|
||||
break;
|
||||
|
||||
case HB_SCRIPT_TAKRI:
|
||||
@ -445,14 +430,12 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
||||
buffer->next_glyph ();
|
||||
if (matched) _output_with_dotted_circle (buffer);
|
||||
}
|
||||
processed = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (processed)
|
||||
buffer->swap_buffers ();
|
||||
buffer->swap_buffers ();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user