Clean up buffer->swap_buffers() calls
That function checks for buffer->successful already. No need to check at call site.
This commit is contained in:
parent
4eb52460c8
commit
17335a8161
@ -211,9 +211,7 @@ print (' }')
|
||||
print (' if (processed)')
|
||||
print (' {')
|
||||
print (' if (buffer->idx < count)')
|
||||
print (' buffer->next_glyph ();')
|
||||
print (' if (likely (buffer->successful))')
|
||||
print (' buffer->swap_buffers ();')
|
||||
print (' buffer->next_glyph ();')
|
||||
print (' }')
|
||||
print ('}')
|
||||
|
||||
|
@ -671,8 +671,7 @@ struct StateTableDriver
|
||||
{
|
||||
for (; buffer->successful && buffer->idx < buffer->len;)
|
||||
buffer->next_glyph ();
|
||||
if (likely (buffer->successful))
|
||||
buffer->swap_buffers ();
|
||||
buffer->swap_buffers ();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1121,8 +1121,7 @@ struct mortmorx
|
||||
else
|
||||
buffer->next_glyph ();
|
||||
}
|
||||
if (likely (buffer->successful))
|
||||
buffer->swap_buffers ();
|
||||
buffer->swap_buffers ();
|
||||
}
|
||||
|
||||
inline void apply (hb_aat_apply_context_t *c) const
|
||||
|
@ -1018,7 +1018,6 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
||||
else
|
||||
buffer->next_glyph ();
|
||||
}
|
||||
|
||||
buffer->swap_buffers ();
|
||||
}
|
||||
|
||||
|
@ -414,7 +414,6 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
||||
else
|
||||
buffer->next_glyph ();
|
||||
}
|
||||
|
||||
buffer->swap_buffers ();
|
||||
}
|
||||
|
||||
|
@ -343,7 +343,6 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
||||
else
|
||||
buffer->next_glyph ();
|
||||
}
|
||||
|
||||
buffer->swap_buffers ();
|
||||
}
|
||||
|
||||
|
@ -357,8 +357,7 @@ preprocess_text_thai (const hb_ot_shape_plan_t *plan,
|
||||
buffer->merge_out_clusters (start - 1, end);
|
||||
}
|
||||
}
|
||||
if (likely (buffer->successful))
|
||||
buffer->swap_buffers ();
|
||||
buffer->swap_buffers ();
|
||||
|
||||
/* If font has Thai GSUB, we are done. */
|
||||
if (plan->props.script == HB_SCRIPT_THAI && !plan->map.found_script[0])
|
||||
|
@ -552,7 +552,6 @@ insert_dotted_circles (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
||||
else
|
||||
buffer->next_glyph ();
|
||||
}
|
||||
|
||||
buffer->swap_buffers ();
|
||||
}
|
||||
|
||||
|
@ -429,9 +429,8 @@ _hb_preprocess_text_vowel_constraints (const hb_ot_shape_plan_t *plan HB_UNUSED,
|
||||
if (processed)
|
||||
{
|
||||
if (buffer->idx < count)
|
||||
buffer->next_glyph ();
|
||||
if (likely (buffer->successful))
|
||||
buffer->swap_buffers ();
|
||||
buffer->next_glyph ();
|
||||
buffer->swap_buffers ();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -425,7 +425,6 @@ hb_insert_dotted_circle (hb_buffer_t *buffer, hb_font_t *font)
|
||||
buffer->output_info (info);
|
||||
while (buffer->idx < buffer->len && buffer->successful)
|
||||
buffer->next_glyph ();
|
||||
|
||||
buffer->swap_buffers ();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user