]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/strmatch.cpp
ICU-62141.0.1.tar.gz
[apple/icu.git] / icuSources / i18n / strmatch.cpp
index 466dc4d89706fd81e26b3b99a9d59c2e87d58257..aa9e7ae9d1b909ae8335d137a68159522f30f4bb 100644 (file)
@@ -1,6 +1,8 @@
+// © 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
@@ -65,7 +67,10 @@ UnicodeFunctor* StringMatcher::clone() const {
  * 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;
 }
 
 /**
@@ -73,7 +78,10 @@ UnicodeMatcher* StringMatcher::toMatcher() const {
  * 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;
 }
 
 /**