X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/374ca955a76ecab1204ca8bfa63ff9238d998416..b331163bffd790ced0e88b73f44f86d49ccc48a5:/icuSources/common/usc_impl.c?ds=sidebyside diff --git a/icuSources/common/usc_impl.c b/icuSources/common/usc_impl.c index 1807e1bd..e30c7f5a 100644 --- a/icuSources/common/usc_impl.c +++ b/icuSources/common/usc_impl.c @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 1999-2004, International Business Machines +* Copyright (C) 1999-2014, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * @@ -146,7 +146,7 @@ highBit(int32_t value) } if (value >= 1 << 1) { - value >>= 1; + //value >>= 1; bit += 1; } @@ -161,25 +161,25 @@ getPairIndex(UChar32 ch) int32_t pairedCharExtra = pairedCharCount - pairedCharPower; int32_t probe = pairedCharPower; - int32_t index = 0; + int32_t pairIndex = 0; if (ch >= pairedChars[pairedCharExtra]) { - index = pairedCharExtra; + pairIndex = pairedCharExtra; } while (probe > (1 << 0)) { probe >>= 1; - if (ch >= pairedChars[index + probe]) { - index += probe; + if (ch >= pairedChars[pairIndex + probe]) { + pairIndex += probe; } } - if (pairedChars[index] != ch) { - index = -1; + if (pairedChars[pairIndex] != ch) { + pairIndex = -1; } - return index; + return pairIndex; } static UBool