]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/unifilt.cpp
ICU-57132.0.1.tar.gz
[apple/icu.git] / icuSources / common / unifilt.cpp
index 856e5b972c0f0930a0a01a97cafd56ad8d308792..5e1a131f11d2be8cedca9c253c7539647efd6467 100644 (file)
@@ -1,6 +1,6 @@
 /*
 **********************************************************************
-* Copyright (c) 2001-2011, International Business Machines
+* Copyright (c) 2001-2012, International Business Machines
 * Corporation and others.  All Rights Reserved.
 **********************************************************************
 *   Date        Name        Description
@@ -23,11 +23,11 @@ UnicodeMatcher::~UnicodeMatcher() {}
 UnicodeFilter::~UnicodeFilter() {}
 
 /**
- * UnicodeFunctor API.  Cast 'this' to a UnicodeMatcher* pointer
- * and return the pointer.
+ * UnicodeFunctor API.
+ *   Note that UnicodeMatcher is a base class of UnicodeFilter.
  */
 UnicodeMatcher* UnicodeFilter::toMatcher() const {
-    return (UnicodeMatcher*) this;
+  return const_cast<UnicodeFilter *>(this);
 }
 
 void UnicodeFilter::setData(const TransliterationRuleData*) {}