This commit is contained in:
Behdad Esfahbod 2010-05-05 00:32:21 -04:00
parent 27e302dc8e
commit fff9aa263d
1 changed files with 6 additions and 6 deletions

View File

@ -281,10 +281,10 @@ struct Rule
inline bool apply (APPLY_ARG_DEF, ContextLookupContext &lookup_context) const inline bool apply (APPLY_ARG_DEF, ContextLookupContext &lookup_context) const
{ {
TRACE_APPLY (); TRACE_APPLY ();
const LookupRecord &lookupRecord = StructAtOffset<LookupRecord> (input, input[0].get_size () * (inputCount ? inputCount - 1 : 0)); const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (input, input[0].get_size () * (inputCount ? inputCount - 1 : 0));
return context_lookup (APPLY_ARG, return context_lookup (APPLY_ARG,
inputCount, input, inputCount, input,
lookupCount, &lookupRecord, lookupCount, lookupRecord,
lookup_context); lookup_context);
} }
@ -433,14 +433,14 @@ struct ContextFormat3
if (likely (index == NOT_COVERED)) if (likely (index == NOT_COVERED))
return false; return false;
const LookupRecord &lookupRecord = StructAtOffset<LookupRecord> (coverage, coverage[0].get_size () * glyphCount); const LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (coverage, coverage[0].get_size () * glyphCount);
struct ContextLookupContext lookup_context = { struct ContextLookupContext lookup_context = {
{match_coverage, apply_func}, {match_coverage, apply_func},
CharP(this) CharP(this)
}; };
return context_lookup (APPLY_ARG, return context_lookup (APPLY_ARG,
glyphCount, (const USHORT *) (coverage + 1), glyphCount, (const USHORT *) (coverage + 1),
lookupCount, &lookupRecord, lookupCount, lookupRecord,
lookup_context); lookup_context);
} }
@ -451,8 +451,8 @@ struct ContextFormat3
if (!SANITIZE_ARRAY (coverage, OffsetTo<Coverage>::get_size (), glyphCount)) return false; if (!SANITIZE_ARRAY (coverage, OffsetTo<Coverage>::get_size (), glyphCount)) return false;
for (unsigned int i = 0; i < count; i++) for (unsigned int i = 0; i < count; i++)
if (!SANITIZE_WITH_BASE (this, coverage[i])) return false; if (!SANITIZE_WITH_BASE (this, coverage[i])) return false;
LookupRecord &lookupRecord = StructAtOffset<LookupRecord> (coverage, OffsetTo<Coverage>::get_size () * glyphCount); LookupRecord *lookupRecord = &StructAtOffset<LookupRecord> (coverage, OffsetTo<Coverage>::get_size () * glyphCount);
return SANITIZE_ARRAY (&lookupRecord, LookupRecord::get_size (), lookupCount); return SANITIZE_ARRAY (lookupRecord, LookupRecord::get_size (), lookupCount);
} }
private: private: