]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/remtrans.cpp
ICU-64260.0.1.tar.gz
[apple/icu.git] / icuSources / i18n / remtrans.cpp
index d4e616e1dfcec1ebaa19bb3f3077fdbab73c69ab..70a6ed3935b579848a9292d4fb6a44ea57796945 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-2005, International Business Machines
+*   Copyright (c) 2001-2011, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 **********************************************************************
 *   Date        Name        Description
@@ -35,19 +37,20 @@ static Transliterator* RemoveTransliterator_create(const UnicodeString& /*ID*/,
  */
 void RemoveTransliterator::registerIDs() {
 
-    Transliterator::_registerFactory(::CURR_ID, RemoveTransliterator_create, integerToken(0));
+    Transliterator::_registerFactory(UnicodeString(TRUE, ::CURR_ID, -1),
+                                     RemoveTransliterator_create, integerToken(0));
 
     Transliterator::_registerSpecialInverse(UNICODE_STRING_SIMPLE("Remove"),
                                             UNICODE_STRING_SIMPLE("Null"), FALSE);
 }
 
-RemoveTransliterator::RemoveTransliterator() : Transliterator(::CURR_ID, 0) {}
+RemoveTransliterator::RemoveTransliterator() : Transliterator(UnicodeString(TRUE, ::CURR_ID, -1), 0) {}
 
 RemoveTransliterator::~RemoveTransliterator() {}
 
 Transliterator* RemoveTransliterator::clone(void) const {
     Transliterator* result = new RemoveTransliterator();
-    if (getFilter() != 0) {
+    if (result != NULL && getFilter() != 0) {
         result->adoptFilter((UnicodeFilter*)(getFilter()->clone()));
     }
     return result;