X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/374ca955a76ecab1204ca8bfa63ff9238d998416..ef6cf650f4a75c3f97de06b51fa104f2069b9ea2:/icuSources/layout/AlternateSubstSubtables.cpp?ds=inline diff --git a/icuSources/layout/AlternateSubstSubtables.cpp b/icuSources/layout/AlternateSubstSubtables.cpp index 81989cdd..c4323e3c 100644 --- a/icuSources/layout/AlternateSubstSubtables.cpp +++ b/icuSources/layout/AlternateSubstSubtables.cpp @@ -1,6 +1,6 @@ /* * - * (C) Copyright IBM Corp. 1998-2004 - All Rights Reserved + * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved * */ @@ -14,25 +14,26 @@ U_NAMESPACE_BEGIN -le_uint32 AlternateSubstitutionSubtable::process(GlyphIterator *glyphIterator, const LEGlyphFilter *filter) const +le_uint32 AlternateSubstitutionSubtable::process(const LEReferenceTo &base, + GlyphIterator *glyphIterator, LEErrorCode &success, const LEGlyphFilter *filter) const { // NOTE: For now, we'll just pick the first alternative... LEGlyphID glyph = glyphIterator->getCurrGlyphID(); - le_int32 coverageIndex = getGlyphCoverage(glyph); + le_int32 coverageIndex = getGlyphCoverage(base, glyph, success); - if (coverageIndex >= 0) { + if (coverageIndex >= 0 && LE_SUCCESS(success)) { le_uint16 altSetCount = SWAPW(alternateSetCount); if (coverageIndex < altSetCount) { Offset alternateSetTableOffset = SWAPW(alternateSetTableOffsetArray[coverageIndex]); - const AlternateSetTable *alternateSetTable = - (const AlternateSetTable *) ((char *) this + alternateSetTableOffset); + const LEReferenceTo alternateSetTable(base, success, + (const AlternateSetTable *) ((char *) this + alternateSetTableOffset)); TTGlyphID alternate = SWAPW(alternateSetTable->alternateArray[0]); if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, alternate))) { glyphIterator->setCurrGlyphID(SWAPW(alternateSetTable->alternateArray[0])); } - + return 1; }