X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/374ca955a76ecab1204ca8bfa63ff9238d998416..b801cf366c7671a99bdcef84d1e9c0ec64b36723:/icuSources/i18n/quant.cpp?ds=inline diff --git a/icuSources/i18n/quant.cpp b/icuSources/i18n/quant.cpp index 9a5606da..b7b69f1f 100644 --- a/icuSources/i18n/quant.cpp +++ b/icuSources/i18n/quant.cpp @@ -1,5 +1,7 @@ /* -* Copyright (C) 2001-2003, International Business Machines Corporation and others. All Rights Reserved. +********************************************************************** +* Copyright (C) 2001-2012, International Business Machines +* Corporation and others. All Rights Reserved. ********************************************************************** * Date Name Description * 07/26/01 aliu Creation. @@ -52,7 +54,10 @@ UnicodeFunctor* Quantifier::clone() const { * and return the pointer. */ UnicodeMatcher* Quantifier::toMatcher() const { - return (UnicodeMatcher*) this; + Quantifier *nonconst_this = const_cast(this); + UnicodeMatcher *nonconst_base = static_cast(nonconst_this); + + return nonconst_base; } UMatchDegree Quantifier::matches(const Replaceable& text, @@ -92,7 +97,7 @@ UMatchDegree Quantifier::matches(const Replaceable& text, */ UnicodeString& Quantifier::toPattern(UnicodeString& result, UBool escapeUnprintable) const { - result.truncate(0); + result.truncate(0); matcher->toMatcher()->toPattern(result, escapeUnprintable); if (minCount == 0) { if (maxCount == 1) { @@ -126,7 +131,7 @@ UBool Quantifier::matchesIndexValue(uint8_t v) const { */ void Quantifier::addMatchSetTo(UnicodeSet& toUnionTo) const { if (maxCount > 0) { - matcher->toMatcher()->addMatchSetTo(toUnionTo); + matcher->toMatcher()->addMatchSetTo(toUnionTo); } } @@ -134,7 +139,7 @@ void Quantifier::addMatchSetTo(UnicodeSet& toUnionTo) const { * Implement UnicodeFunctor */ void Quantifier::setData(const TransliterationRuleData* d) { - matcher->setData(d); + matcher->setData(d); } U_NAMESPACE_END