+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
-* 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.
* and return the pointer.
*/
UnicodeMatcher* Quantifier::toMatcher() const {
- return (UnicodeMatcher*) this;
+ Quantifier *nonconst_this = const_cast<Quantifier *>(this);
+ UnicodeMatcher *nonconst_base = static_cast<UnicodeMatcher *>(nonconst_this);
+
+ return nonconst_base;
}
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) {
*/
void Quantifier::addMatchSetTo(UnicodeSet& toUnionTo) const {
if (maxCount > 0) {
- matcher->toMatcher()->addMatchSetTo(toUnionTo);
+ matcher->toMatcher()->addMatchSetTo(toUnionTo);
}
}
* Implement UnicodeFunctor
*/
void Quantifier::setData(const TransliterationRuleData* d) {
- matcher->setData(d);
+ matcher->setData(d);
}
U_NAMESPACE_END