X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/374ca955a76ecab1204ca8bfa63ff9238d998416..5ea0322b6ab2af986e4c764284141380031dd014:/icuSources/tools/ctestfw/datamap.cpp?ds=sidebyside diff --git a/icuSources/tools/ctestfw/datamap.cpp b/icuSources/tools/ctestfw/datamap.cpp index 30da4500..c59447c8 100644 --- a/icuSources/tools/ctestfw/datamap.cpp +++ b/icuSources/tools/ctestfw/datamap.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 2002-2004, International Business Machines Corporation and + * Copyright (c) 2002-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -11,6 +11,9 @@ #include "hash.h" #include +DataMap::~DataMap() {} +DataMap::DataMap() {} + int32_t DataMap::utoi(const UnicodeString &s) const { @@ -69,7 +72,7 @@ void RBDataMap::init(UResourceBundle *data, UErrorCode &status) { UResourceBundle *t = NULL; for(i = 0; i < ures_getSize(data); i++) { t = ures_getByIndex(data, i, t, &status); - fData->put(UnicodeString(ures_getKey(t), ""), new ResourceBundle(t, status), status); + fData->put(UnicodeString(ures_getKey(t), -1, US_INV), new ResourceBundle(t, status), status); } ures_close(t); } @@ -100,7 +103,7 @@ const ResourceBundle *RBDataMap::getItem(const char* key, UErrorCode &status) co return NULL; } - UnicodeString hashKey(key, ""); + UnicodeString hashKey(key, -1, US_INV); const ResourceBundle *r = (ResourceBundle *)fData->get(hashKey); if(r != NULL) { return r; @@ -116,7 +119,6 @@ const UnicodeString RBDataMap::getString(const char* key, UErrorCode &status) co if(U_SUCCESS(status)) { return r->getString(status); } else { - status = U_MISSING_RESOURCE_ERROR; return UnicodeString(); } } @@ -190,7 +192,6 @@ const UnicodeString* RBDataMap::getStringArray(int32_t& count, const char* key, } return result; } else { - status = U_MISSING_RESOURCE_ERROR; return NULL; } } @@ -214,7 +215,7 @@ const int32_t* RBDataMap::getIntArray(int32_t& count, const char* key, UErrorCod } return result; } else { - status = U_MISSING_RESOURCE_ERROR; return NULL; } } +