mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 22:41:10 +01:00
[buffer-verify] Simplify a couple ifs
This commit is contained in:
1 parent
e527c17e23
commit
c85ca75eff
1 file changed
+6
-13
+6
-13
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user