Minor
This commit is contained in:
parent
b9993d8d6d
commit
92aeee3f04
|
@ -696,7 +696,7 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan,
|
|||
|
||||
CFRange range = CTRunGetStringRange (run);
|
||||
buffer->ensure (buffer->len + range.length);
|
||||
if (buffer->in_error)
|
||||
if (unlikely (buffer->in_error))
|
||||
FAIL ("Buffer resize failed");
|
||||
hb_glyph_info_t *info = buffer->info + buffer->len;
|
||||
|
||||
|
@ -738,7 +738,7 @@ _hb_coretext_shape (hb_shape_plan_t *shape_plan,
|
|||
/* Needed buffer size in case we end up using scratch buffer. */
|
||||
unsigned int alt_size = (sizeof (CGGlyph) + sizeof (CGPoint) + sizeof (CFIndex)) / sizeof (hb_glyph_info_t) + 2;
|
||||
buffer->ensure (MAX (buffer->len + num_glyphs, alt_size));
|
||||
if (buffer->in_error)
|
||||
if (unlikely (buffer->in_error))
|
||||
FAIL ("Buffer resize failed");
|
||||
|
||||
scratch = buffer->get_scratch_buffer (&scratch_size);
|
||||
|
|
|
@ -904,7 +904,7 @@ retry:
|
|||
if (unlikely (hr == E_OUTOFMEMORY))
|
||||
{
|
||||
buffer->ensure (buffer->allocated * 2);
|
||||
if (buffer->in_error)
|
||||
if (unlikely (buffer->in_error))
|
||||
FAIL ("Buffer resize failed");
|
||||
goto retry;
|
||||
}
|
||||
|
@ -974,7 +974,7 @@ retry:
|
|||
#undef utf16_index
|
||||
|
||||
buffer->ensure (glyphs_len);
|
||||
if (buffer->in_error)
|
||||
if (unlikely (buffer->in_error))
|
||||
FAIL ("Buffer in error");
|
||||
|
||||
#undef FAIL
|
||||
|
|
Loading…
Reference in New Issue