X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/46f4442e9a5a4f3b98b7c1083586332f6a8a99a4..f3c0d7a59d99c2a94c6b8822291f0e42be3773c9:/icuSources/i18n/rbt_data.cpp diff --git a/icuSources/i18n/rbt_data.cpp b/icuSources/i18n/rbt_data.cpp index beef9923..4b596ac6 100644 --- a/icuSources/i18n/rbt_data.cpp +++ b/icuSources/i18n/rbt_data.cpp @@ -1,6 +1,8 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html /* ********************************************************************** -* Copyright (C) 1999-2008, International Business Machines +* Copyright (C) 1999-2014, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Date Name Description @@ -28,7 +30,7 @@ TransliterationRuleData::TransliterationRuleData(UErrorCode& status) if (U_FAILURE(status)) { return; } - variableNames.setValueDeleter(uhash_deleteUnicodeString); + variableNames.setValueDeleter(uprv_deleteUObject); variables = 0; variablesLength = 0; } @@ -41,8 +43,8 @@ TransliterationRuleData::TransliterationRuleData(const TransliterationRuleData& { UErrorCode status = U_ZERO_ERROR; int32_t i = 0; - variableNames.setValueDeleter(uhash_deleteUnicodeString); - int32_t pos = -1; + variableNames.setValueDeleter(uprv_deleteUObject); + int32_t pos = UHASH_FIRST; const UHashElement *e; while ((e = other.variableNames.nextElement(pos)) != 0) { UnicodeString* value = @@ -72,7 +74,7 @@ TransliterationRuleData::TransliterationRuleData(const TransliterationRuleData& } // Remove the array and exit if memory allocation error occured. if (U_FAILURE(status)) { - for (int32_t n = i-1; n >= 0; n++) { + for (int32_t n = i-1; n >= 0; n--) { delete variables[n]; } uprv_free(variables);