+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
**********************************************************************
-* Copyright (c) 2001-2011, International Business Machines Corporation
+* Copyright (c) 2001-2012, International Business Machines Corporation
* and others. All Rights Reserved.
**********************************************************************
* Date Name Description
* and return the pointer.
*/
UnicodeMatcher* StringMatcher::toMatcher() const {
- return (UnicodeMatcher*) this;
+ StringMatcher *nonconst_this = const_cast<StringMatcher *>(this);
+ UnicodeMatcher *nonconst_base = static_cast<UnicodeMatcher *>(nonconst_this);
+
+ return nonconst_base;
}
/**
* and return the pointer.
*/
UnicodeReplacer* StringMatcher::toReplacer() const {
- return (UnicodeReplacer*) this;
+ StringMatcher *nonconst_this = const_cast<StringMatcher *>(this);
+ UnicodeReplacer *nonconst_base = static_cast<UnicodeReplacer *>(nonconst_this);
+
+ return nonconst_base;
}
/**