X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/729e4ab9bc6618bc3d8a898e575df7f4019e29ca..ef6cf650f4a75c3f97de06b51fa104f2069b9ea2:/icuSources/layout/GlyphSubstLookupProc.cpp?ds=inline diff --git a/icuSources/layout/GlyphSubstLookupProc.cpp b/icuSources/layout/GlyphSubstLookupProc.cpp index 195de9dc..8698b341 100644 --- a/icuSources/layout/GlyphSubstLookupProc.cpp +++ b/icuSources/layout/GlyphSubstLookupProc.cpp @@ -1,6 +1,6 @@ /* * - * (C) Copyright IBM Corp. 1998-2010 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved * */ @@ -26,7 +26,7 @@ U_NAMESPACE_BEGIN GlyphSubstitutionLookupProcessor::GlyphSubstitutionLookupProcessor( - const GlyphSubstitutionTableHeader *glyphSubstitutionTableHeader, + const LEReferenceTo &glyphSubstitutionTableHeader, LETag scriptTag, LETag languageTag, const LEGlyphFilter *filter, @@ -35,7 +35,7 @@ GlyphSubstitutionLookupProcessor::GlyphSubstitutionLookupProcessor( le_bool featureOrder, LEErrorCode& success) : LookupProcessor( - (char *) glyphSubstitutionTableHeader, + glyphSubstitutionTableHeader, SWAPW(glyphSubstitutionTableHeader->scriptListOffset), SWAPW(glyphSubstitutionTableHeader->featureListOffset), SWAPW(glyphSubstitutionTableHeader->lookupListOffset), @@ -48,7 +48,7 @@ GlyphSubstitutionLookupProcessor::GlyphSubstitutionLookupProcessor() { } -le_uint32 GlyphSubstitutionLookupProcessor::applySubtable(const LookupSubtable *lookupSubtable, le_uint16 lookupType, +le_uint32 GlyphSubstitutionLookupProcessor::applySubtable(const LEReferenceTo &lookupSubtable, le_uint16 lookupType, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode& success) const { if (LE_FAILURE(success)) { @@ -64,39 +64,39 @@ le_uint32 GlyphSubstitutionLookupProcessor::applySubtable(const LookupSubtable * case gsstSingle: { - const SingleSubstitutionSubtable *subtable = (const SingleSubstitutionSubtable *) lookupSubtable; + const LEReferenceTo subtable(lookupSubtable, success); - delta = subtable->process(glyphIterator, fFilter); + delta = subtable->process(subtable, glyphIterator, success, fFilter); break; } case gsstMultiple: { - const MultipleSubstitutionSubtable *subtable = (const MultipleSubstitutionSubtable *) lookupSubtable; + const LEReferenceTo subtable(lookupSubtable, success); - delta = subtable->process(glyphIterator, success, fFilter); + delta = subtable->process(subtable, glyphIterator, success, fFilter); break; } case gsstAlternate: { - const AlternateSubstitutionSubtable *subtable = (const AlternateSubstitutionSubtable *) lookupSubtable; + const LEReferenceTo subtable(lookupSubtable, success); - delta = subtable->process(glyphIterator, fFilter); + delta = subtable->process(subtable, glyphIterator, success, fFilter); break; } case gsstLigature: { - const LigatureSubstitutionSubtable *subtable = (const LigatureSubstitutionSubtable *) lookupSubtable; + const LEReferenceTo subtable(lookupSubtable, success); - delta = subtable->process(glyphIterator, fFilter); + delta = subtable->process(subtable, glyphIterator, success, fFilter); break; } case gsstContext: { - const ContextualSubstitutionSubtable *subtable = (const ContextualSubstitutionSubtable *) lookupSubtable; + const LEReferenceTo subtable(lookupSubtable, success); delta = subtable->process(this, glyphIterator, fontInstance, success); break; @@ -104,7 +104,7 @@ le_uint32 GlyphSubstitutionLookupProcessor::applySubtable(const LookupSubtable * case gsstChainingContext: { - const ChainingContextualSubstitutionSubtable *subtable = (const ChainingContextualSubstitutionSubtable *) lookupSubtable; + const LEReferenceTo subtable(lookupSubtable, success); delta = subtable->process(this, glyphIterator, fontInstance, success); break; @@ -112,7 +112,7 @@ le_uint32 GlyphSubstitutionLookupProcessor::applySubtable(const LookupSubtable * case gsstExtension: { - const ExtensionSubtable *subtable = (const ExtensionSubtable *) lookupSubtable; + const LEReferenceTo subtable(lookupSubtable, success); delta = subtable->process(this, lookupType, glyphIterator, fontInstance, success); break;