mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-25 00:41:09 +01:00
[OT] Remove likely() from coverage check
Not that it matters, but because of the set-digest, this path is not very likely() anymore.
This commit is contained in:
1 parent
3577992a5b
commit
c737829449
11 files changed
+15
-15
No files matched your search
@@ -145,7 +145,7 @@ struct PairPosFormat1_3
|
||||
#else
|
||||
unsigned int index = (this+coverage).get_coverage (buffer->cur().codepoint);
|
||||
#endif
|
||||
if (likely (index == NOT_COVERED)) return_trace (false);
|
||||
if (index == NOT_COVERED) return_trace (false);
|
||||
|
||||
hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input;
|
||||
skippy_iter.reset_fast (buffer->idx);
|
||||
|
||||
@@ -176,7 +176,7 @@ struct PairPosFormat2_4 : ValueBase
|
||||
#else
|
||||
unsigned int index = (this+coverage).get_coverage (buffer->cur().codepoint);
|
||||
#endif
|
||||
if (likely (index == NOT_COVERED)) return_trace (false);
|
||||
if (index == NOT_COVERED) return_trace (false);
|
||||
|
||||
hb_ot_apply_context_t::skipping_iterator_t &skippy_iter = c->iter_input;
|
||||
skippy_iter.reset_fast (buffer->idx);
|
||||
|
||||
@@ -67,7 +67,7 @@ struct SinglePosFormat1 : ValueBase
|
||||
TRACE_APPLY (this);
|
||||
hb_buffer_t *buffer = c->buffer;
|
||||
unsigned int index = (this+coverage).get_coverage (buffer->cur().codepoint);
|
||||
if (likely (index == NOT_COVERED)) return_trace (false);
|
||||
if (index == NOT_COVERED) return_trace (false);
|
||||
|
||||
if (HB_BUFFER_MESSAGE_MORE && c->buffer->messaging ())
|
||||
{
|
||||
|
||||
@@ -66,7 +66,7 @@ struct SinglePosFormat2 : ValueBase
|
||||
TRACE_APPLY (this);
|
||||
hb_buffer_t *buffer = c->buffer;
|
||||
unsigned int index = (this+coverage).get_coverage (buffer->cur().codepoint);
|
||||
if (likely (index == NOT_COVERED)) return_trace (false);
|
||||
if (index == NOT_COVERED) return_trace (false);
|
||||
|
||||
if (unlikely (index >= valueCount)) return_trace (false);
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ struct AlternateSubstFormat1_2
|
||||
TRACE_APPLY (this);
|
||||
|
||||
unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
|
||||
if (likely (index == NOT_COVERED)) return_trace (false);
|
||||
if (index == NOT_COVERED) return_trace (false);
|
||||
|
||||
return_trace ((this+alternateSet[index]).apply (c));
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ struct LigatureSubstFormat1_2
|
||||
#else
|
||||
unsigned int index = (this+coverage).get_coverage (buffer->cur().codepoint);
|
||||
#endif
|
||||
if (likely (index == NOT_COVERED)) return_trace (false);
|
||||
if (index == NOT_COVERED) return_trace (false);
|
||||
|
||||
const auto &lig_set = this+ligatureSet[index];
|
||||
return_trace (lig_set.apply (c));
|
||||
|
||||
@@ -66,7 +66,7 @@ struct MultipleSubstFormat1_2
|
||||
TRACE_APPLY (this);
|
||||
|
||||
unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
|
||||
if (likely (index == NOT_COVERED)) return_trace (false);
|
||||
if (index == NOT_COVERED) return_trace (false);
|
||||
|
||||
return_trace ((this+sequence[index]).apply (c));
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ struct ReverseChainSingleSubstFormat1
|
||||
{
|
||||
TRACE_APPLY (this);
|
||||
unsigned int index = (this+coverage).get_coverage (c->buffer->cur ().codepoint);
|
||||
if (likely (index == NOT_COVERED)) return_trace (false);
|
||||
if (index == NOT_COVERED) return_trace (false);
|
||||
|
||||
if (unlikely (c->nesting_level_left != HB_MAX_NESTING_LEVEL))
|
||||
return_trace (false); /* No chaining to this type */
|
||||
|
||||
@@ -128,7 +128,7 @@ struct SingleSubstFormat1_3
|
||||
TRACE_APPLY (this);
|
||||
hb_codepoint_t glyph_id = c->buffer->cur().codepoint;
|
||||
unsigned int index = (this+coverage).get_coverage (glyph_id);
|
||||
if (likely (index == NOT_COVERED)) return_trace (false);
|
||||
if (index == NOT_COVERED) return_trace (false);
|
||||
|
||||
hb_codepoint_t d = deltaGlyphID;
|
||||
hb_codepoint_t mask = get_mask ();
|
||||
|
||||
@@ -104,7 +104,7 @@ struct SingleSubstFormat2_4
|
||||
{
|
||||
TRACE_APPLY (this);
|
||||
unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
|
||||
if (likely (index == NOT_COVERED)) return_trace (false);
|
||||
if (index == NOT_COVERED) return_trace (false);
|
||||
|
||||
if (unlikely (index >= substitute.len)) return_trace (false);
|
||||
|
||||
|
||||
@@ -2671,7 +2671,7 @@ struct ContextFormat2_5
|
||||
{
|
||||
TRACE_APPLY (this);
|
||||
unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
|
||||
if (likely (index == NOT_COVERED)) return_trace (false);
|
||||
if (index == NOT_COVERED) return_trace (false);
|
||||
|
||||
const ClassDef &class_def = this+classDef;
|
||||
|
||||
@@ -2857,7 +2857,7 @@ struct ContextFormat3
|
||||
{
|
||||
TRACE_APPLY (this);
|
||||
unsigned int index = (this+coverageZ[0]).get_coverage (c->buffer->cur().codepoint);
|
||||
if (likely (index == NOT_COVERED)) return_trace (false);
|
||||
if (index == NOT_COVERED) return_trace (false);
|
||||
|
||||
const LookupRecord *lookupRecord = &StructAfter<LookupRecord> (coverageZ.as_array (glyphCount));
|
||||
struct ContextApplyLookupContext lookup_context = {
|
||||
@@ -3671,7 +3671,7 @@ struct ChainContextFormat1_4
|
||||
{
|
||||
TRACE_APPLY (this);
|
||||
unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
|
||||
if (likely (index == NOT_COVERED)) return_trace (false);
|
||||
if (index == NOT_COVERED) return_trace (false);
|
||||
|
||||
const ChainRuleSet &rule_set = this+ruleSet[index];
|
||||
struct ChainContextApplyLookupContext lookup_context = {
|
||||
@@ -3920,7 +3920,7 @@ struct ChainContextFormat2_5
|
||||
{
|
||||
TRACE_APPLY (this);
|
||||
unsigned int index = (this+coverage).get_coverage (c->buffer->cur().codepoint);
|
||||
if (likely (index == NOT_COVERED)) return_trace (false);
|
||||
if (index == NOT_COVERED) return_trace (false);
|
||||
|
||||
const ClassDef &backtrack_class_def = this+backtrackClassDef;
|
||||
const ClassDef &input_class_def = this+inputClassDef;
|
||||
@@ -4166,7 +4166,7 @@ struct ChainContextFormat3
|
||||
const auto &input = StructAfter<decltype (inputX)> (backtrack);
|
||||
|
||||
unsigned int index = (this+input[0]).get_coverage (c->buffer->cur().codepoint);
|
||||
if (likely (index == NOT_COVERED)) return_trace (false);
|
||||
if (index == NOT_COVERED) return_trace (false);
|
||||
|
||||
const auto &lookahead = StructAfter<decltype (lookaheadX)> (input);
|
||||
const auto &lookup = StructAfter<decltype (lookupX)> (lookahead);
|
||||
|
||||
Reference in new issue
Block a user