]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/i18n/anytrans.cpp
ICU-64260.0.1.tar.gz
[apple/icu.git] / icuSources / i18n / anytrans.cpp
index ffe8baff4c1ecbe035669515b9fff22caf0cb3e0..6e382b824b95b7cd6ba8932c3b18c2cee0756c19 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) 2002-2016 International Business Machines Corporation
+* Copyright (c) 2002-2014, International Business Machines Corporation
 * and others.  All Rights Reserved.
 *****************************************************************
 * Date        Name        Description
@@ -34,7 +36,7 @@ static const UChar NULL_ID[] = {78,117,108,108,0}; // "Null"
 static const UChar LATIN_PIVOT[] = {0x2D,0x4C,0x61,0x74,0x6E,0x3B,0x4C,0x61,0x74,0x6E,0x2D,0}; // "-Latn;Latn-"
 
 // initial size for an Any-XXXX transform's cache of script-XXXX transforms
-// (will grow as necessary, but we don't expect to have source text wit more than 7 scripts)
+// (will grow as necessary, but we don't expect to have source text with more than 7 scripts)
 #define ANY_TRANS_CACHE_INIT_SIZE 7
 
 //------------------------------------------------------------
@@ -389,12 +391,12 @@ void AnyTransliterator::registerIDs() {
                 UnicodeString id;
                 TransliteratorIDParser::STVtoID(UnicodeString(TRUE, ANY, 3), target, variant, id);
                 ec = U_ZERO_ERROR;
-                AnyTransliterator* t = new AnyTransliterator(id, target, variant,
+                AnyTransliterator* tl = new AnyTransliterator(id, target, variant,
                                                              targetScript, ec);
                 if (U_FAILURE(ec)) {
-                    delete t;
+                    delete tl;
                 } else {
-                    Transliterator::_registerInstance(t);
+                    Transliterator::_registerInstance(tl);
                     Transliterator::_registerSpecialInverse(target, UnicodeString(TRUE, NULL_ID, 4), FALSE);
                 }
             }