[morx] minor, mark with unlikely

at least just to show this is the unusual path
This commit is contained in:
Ebrahim Byagowi 2020-07-14 15:17:17 +04:30 committed by GitHub
parent 11d583a9ea
commit 9566904cb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -725,7 +725,7 @@ struct InsertionSubtable
if (entry.data.markedInsertIndex != 0xFFFF) if (entry.data.markedInsertIndex != 0xFFFF)
{ {
unsigned int count = (flags & MarkedInsertCount); unsigned int count = (flags & MarkedInsertCount);
if ((buffer->max_ops -= count) <= 0) return; if (unlikely ((buffer->max_ops -= count) <= 0)) return;
unsigned int start = entry.data.markedInsertIndex; unsigned int start = entry.data.markedInsertIndex;
const HBGlyphID *glyphs = &insertionAction[start]; const HBGlyphID *glyphs = &insertionAction[start];
if (unlikely (!c->sanitizer.check_array (glyphs, count))) count = 0; if (unlikely (!c->sanitizer.check_array (glyphs, count))) count = 0;
@ -754,7 +754,7 @@ struct InsertionSubtable
if (entry.data.currentInsertIndex != 0xFFFF) if (entry.data.currentInsertIndex != 0xFFFF)
{ {
unsigned int count = (flags & CurrentInsertCount) >> 5; unsigned int count = (flags & CurrentInsertCount) >> 5;
if ((buffer->max_ops -= count) <= 0) return; if (unlikely ((buffer->max_ops -= count) <= 0)) return;
unsigned int start = entry.data.currentInsertIndex; unsigned int start = entry.data.currentInsertIndex;
const HBGlyphID *glyphs = &insertionAction[start]; const HBGlyphID *glyphs = &insertionAction[start];
if (unlikely (!c->sanitizer.check_array (glyphs, count))) count = 0; if (unlikely (!c->sanitizer.check_array (glyphs, count))) count = 0;