X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/4388f060552cc537e71e957d32f35e9d75a61233..340931cb2e044a2141d11567dd0f782524e32994:/icuSources/i18n/regeximp.cpp diff --git a/icuSources/i18n/regeximp.cpp b/icuSources/i18n/regeximp.cpp index 32df5fec..d5556696 100644 --- a/icuSources/i18n/regeximp.cpp +++ b/icuSources/i18n/regeximp.cpp @@ -1,3 +1,5 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html // // Copyright (C) 2012 International Business Machines Corporation // and others. All rights reserved. @@ -17,8 +19,7 @@ U_NAMESPACE_BEGIN CaseFoldingUTextIterator::CaseFoldingUTextIterator(UText &text) : - fUText(text), fcsp(NULL), fFoldChars(NULL), fFoldLength(0) { - fcsp = ucase_getSingleton(); + fUText(text), fFoldChars(NULL), fFoldLength(0) { } CaseFoldingUTextIterator::~CaseFoldingUTextIterator() {} @@ -33,7 +34,7 @@ UChar32 CaseFoldingUTextIterator::next() { if (originalC == U_SENTINEL) { return originalC; } - fFoldLength = ucase_toFullFolding(fcsp, originalC, &fFoldChars, U_FOLD_CASE_DEFAULT); + fFoldLength = ucase_toFullFolding(originalC, &fFoldChars, U_FOLD_CASE_DEFAULT); if (fFoldLength >= UCASE_MAX_STRING_LENGTH || fFoldLength < 0) { // input code point folds to a single code point, possibly itself. // See comment in ucase.h for explanation of return values from ucase_toFullFoldings. @@ -63,8 +64,7 @@ UBool CaseFoldingUTextIterator::inExpansion() { CaseFoldingUCharIterator::CaseFoldingUCharIterator(const UChar *chars, int64_t start, int64_t limit) : - fChars(chars), fIndex(start), fLimit(limit), fcsp(NULL), fFoldChars(NULL), fFoldLength(0) { - fcsp = ucase_getSingleton(); + fChars(chars), fIndex(start), fLimit(limit), fFoldChars(NULL), fFoldLength(0) { } @@ -82,7 +82,7 @@ UChar32 CaseFoldingUCharIterator::next() { } U16_NEXT(fChars, fIndex, fLimit, originalC); - fFoldLength = ucase_toFullFolding(fcsp, originalC, &fFoldChars, U_FOLD_CASE_DEFAULT); + fFoldLength = ucase_toFullFolding(originalC, &fFoldChars, U_FOLD_CASE_DEFAULT); if (fFoldLength >= UCASE_MAX_STRING_LENGTH || fFoldLength < 0) { // input code point folds to a single code point, possibly itself. // See comment in ucase.h for explanation of return values from ucase_toFullFoldings.