From 9566904cb3eee5c33c166641debf1567d9ca301b Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Tue, 14 Jul 2020 15:17:17 +0430 Subject: [PATCH] [morx] minor, mark with unlikely at least just to show this is the unusual path --- src/hb-aat-layout-morx-table.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh index 3c15e54e8..073ab6b61 100644 --- a/src/hb-aat-layout-morx-table.hh +++ b/src/hb-aat-layout-morx-table.hh @@ -725,7 +725,7 @@ struct InsertionSubtable if (entry.data.markedInsertIndex != 0xFFFF) { 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; const HBGlyphID *glyphs = &insertionAction[start]; if (unlikely (!c->sanitizer.check_array (glyphs, count))) count = 0; @@ -754,7 +754,7 @@ struct InsertionSubtable if (entry.data.currentInsertIndex != 0xFFFF) { 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; const HBGlyphID *glyphs = &insertionAction[start]; if (unlikely (!c->sanitizer.check_array (glyphs, count))) count = 0;