mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-13 00:32:59 +00:00
[buffer-verify] Simplify a couple ifs
This commit is contained in:
parent
e527c17e23
commit
c85ca75eff
1 changed files with 6 additions and 13 deletions
|
@ -162,13 +162,8 @@ buffer_verify_unsafe_to_break (hb_buffer_t *buffer,
|
|||
hb_buffer_set_flags (fragment, flags);
|
||||
|
||||
hb_buffer_append (fragment, text_buffer, text_start, text_end);
|
||||
if (!hb_shape_full (font, fragment, features, num_features, shapers))
|
||||
{
|
||||
hb_buffer_destroy (reconstruction);
|
||||
hb_buffer_destroy (fragment);
|
||||
return true;
|
||||
}
|
||||
else if (!fragment->successful || fragment->shaping_failed)
|
||||
if (!hb_shape_full (font, fragment, features, num_features, shapers) ||
|
||||
fragment->successful || fragment->shaping_failed)
|
||||
{
|
||||
hb_buffer_destroy (reconstruction);
|
||||
hb_buffer_destroy (fragment);
|
||||
|
@ -318,14 +313,12 @@ buffer_verify_unsafe_to_concat (hb_buffer_t *buffer,
|
|||
/*
|
||||
* Shape the two fragment streams.
|
||||
*/
|
||||
if (!hb_shape_full (font, fragments[0], features, num_features, shapers))
|
||||
goto out;
|
||||
else if (!fragments[0]->successful || fragments[0]->shaping_failed)
|
||||
if (!hb_shape_full (font, fragments[0], features, num_features, shapers) ||
|
||||
!fragments[0]->successful || fragments[0]->shaping_failed)
|
||||
goto out;
|
||||
|
||||
if (!hb_shape_full (font, fragments[1], features, num_features, shapers))
|
||||
goto out;
|
||||
else if (!fragments[1]->successful || fragments[1]->shaping_failed)
|
||||
if (!hb_shape_full (font, fragments[1], features, num_features, shapers) ||
|
||||
!fragments[1]->successful || fragments[1]->shaping_failed)
|
||||
goto out;
|
||||
|
||||
if (!forward)
|
||||
|
|
Loading…
Add table
Reference in a new issue