X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/51004dcb01e06fef634b61be77ed73dd61cb6db9..ef6cf650f4a75c3f97de06b51fa104f2069b9ea2:/icuSources/tools/toolutil/swapimpl.cpp?ds=sidebyside diff --git a/icuSources/tools/toolutil/swapimpl.cpp b/icuSources/tools/toolutil/swapimpl.cpp index 6b988e2e..dbeff2d7 100644 --- a/icuSources/tools/toolutil/swapimpl.cpp +++ b/icuSources/tools/toolutil/swapimpl.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2005-2012, International Business Machines +* Copyright (C) 2005-2014, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -67,8 +67,6 @@ U_NAMESPACE_USE /* definitions */ -#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0])) - /* Unicode property (value) aliases data swapping --------------------------- */ static int32_t U_CALLCONV @@ -500,9 +498,11 @@ ubidi_swap(const UDataSwapper *ds, ds->swapArray32(ds, inBytes+offset, count, outBytes+offset, pErrorCode); offset+=count; - /* just skip the uint8_t jgArray[] */ + /* just skip the uint8_t jgArray[] and jgArray2[] */ count=indexes[UBIDI_IX_JG_LIMIT]-indexes[UBIDI_IX_JG_START]; offset+=count; + count=indexes[UBIDI_IX_JG_LIMIT2]-indexes[UBIDI_IX_JG_START2]; + offset+=count; U_ASSERT(offset==size); } @@ -790,7 +790,7 @@ udata_swap(const UDataSwapper *ds, } /* dispatch to the swap function for the dataFormat */ - for(i=0; idataFormat, 4)) { swappedLength=swapFns[i].swapFn(ds, inData, length, outData, pErrorCode);