From 2dc1141d7d0a9f5818862b09d6b9cfe0a27f1fc1 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 24 Nov 2012 19:16:34 -0500 Subject: [PATCH] [OTLayout] Remove operator() from ClassDef --- src/hb-ot-layout-common-private.hh | 2 -- src/hb-ot-layout-gpos-table.hh | 4 ++-- src/hb-ot-layout-gsubgpos-private.hh | 8 ++++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/hb-ot-layout-common-private.hh b/src/hb-ot-layout-common-private.hh index c1248e9af..3a97f06b5 100644 --- a/src/hb-ot-layout-common-private.hh +++ b/src/hb-ot-layout-common-private.hh @@ -754,8 +754,6 @@ struct ClassDefFormat2 struct ClassDef { - inline unsigned int operator () (hb_codepoint_t glyph_id) const { return get_class (glyph_id); } - inline unsigned int get_class (hb_codepoint_t glyph_id) const { switch (u.format) { diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh index 968d29351..8f0d38fee 100644 --- a/src/hb-ot-layout-gpos-table.hh +++ b/src/hb-ot-layout-gpos-table.hh @@ -736,8 +736,8 @@ struct PairPosFormat2 unsigned int len2 = valueFormat2.get_len (); unsigned int record_len = len1 + len2; - unsigned int klass1 = (this+classDef1) (c->buffer->cur().codepoint); - unsigned int klass2 = (this+classDef2) (c->buffer->info[skippy_iter.idx].codepoint); + unsigned int klass1 = (this+classDef1).get_class (c->buffer->cur().codepoint); + unsigned int klass2 = (this+classDef2).get_class (c->buffer->info[skippy_iter.idx].codepoint); if (unlikely (klass1 >= class1Count || klass2 >= class2Count)) return TRACE_RETURN (false); const Value *v = &values[record_len * (klass1 * class2Count + klass2)]; diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index 17614aaf2..40e8aa9f7 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh @@ -1192,7 +1192,7 @@ struct ContextFormat2 TRACE_WOULD_APPLY (this); const ClassDef &class_def = this+classDef; - unsigned int index = class_def (c->glyphs[0]); + unsigned int index = class_def.get_class (c->glyphs[0]); const RuleSet &rule_set = this+ruleSet[index]; struct ContextApplyLookupContext lookup_context = { {match_class}, @@ -1213,7 +1213,7 @@ struct ContextFormat2 if (likely (index == NOT_COVERED)) return TRACE_RETURN (false); const ClassDef &class_def = this+classDef; - index = class_def (c->buffer->cur().codepoint); + index = class_def.get_class (c->buffer->cur().codepoint); const RuleSet &rule_set = this+ruleSet[index]; struct ContextApplyLookupContext lookup_context = { {match_class}, @@ -1752,7 +1752,7 @@ struct ChainContextFormat2 const ClassDef &input_class_def = this+inputClassDef; - unsigned int index = input_class_def (c->glyphs[0]); + unsigned int index = input_class_def.get_class (c->glyphs[0]); const ChainRuleSet &rule_set = this+ruleSet[index]; struct ChainContextApplyLookupContext lookup_context = { {match_class}, @@ -1776,7 +1776,7 @@ struct ChainContextFormat2 const ClassDef &input_class_def = this+inputClassDef; const ClassDef &lookahead_class_def = this+lookaheadClassDef; - index = input_class_def (c->buffer->cur().codepoint); + index = input_class_def.get_class (c->buffer->cur().codepoint); const ChainRuleSet &rule_set = this+ruleSet[index]; struct ChainContextApplyLookupContext lookup_context = { {match_class},