Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: source/common/servlkf.cpp

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/common/servlk.cpp ('k') | source/common/servnotf.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 ******************************************************************************* 2 *******************************************************************************
3 * Copyright (C) 2001-2005, International Business Machines Corporation and * 3 * Copyright (C) 2001-2014, International Business Machines Corporation and *
4 * others. All Rights Reserved. * 4 * others. All Rights Reserved. *
5 ******************************************************************************* 5 *******************************************************************************
6 * 6 *
7 ******************************************************************************* 7 *******************************************************************************
8 */ 8 */
9 #include "unicode/utypes.h" 9 #include "unicode/utypes.h"
10 10
11 #if !UCONFIG_NO_SERVICE 11 #if !UCONFIG_NO_SERVICE
12 12
13 #include "unicode/resbund.h" 13 #include "unicode/resbund.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 return supported->get(id) != NULL; 64 return supported->get(id) != NULL;
65 } 65 }
66 return FALSE; 66 return FALSE;
67 } 67 }
68 68
69 void 69 void
70 LocaleKeyFactory::updateVisibleIDs(Hashtable& result, UErrorCode& status) const { 70 LocaleKeyFactory::updateVisibleIDs(Hashtable& result, UErrorCode& status) const {
71 const Hashtable* supported = getSupportedIDs(status); 71 const Hashtable* supported = getSupportedIDs(status);
72 if (supported) { 72 if (supported) {
73 UBool visible = (_coverage & 0x1) == 0; 73 UBool visible = (_coverage & 0x1) == 0;
74
75 const UHashElement* elem = NULL; 74 const UHashElement* elem = NULL;
76 int32_t pos = 0; 75 int32_t pos = UHASH_FIRST;
77 while ((elem = supported->nextElement(pos)) != NULL) { 76 while ((elem = supported->nextElement(pos)) != NULL) {
78 const UnicodeString& id = *((const UnicodeString*)elem->key.pointer) ; 77 const UnicodeString& id = *((const UnicodeString*)elem->key.pointer) ;
79 if (!visible) { 78 if (!visible) {
80 result.remove(id); 79 result.remove(id);
81 } else { 80 } else {
82 result.put(id, (void*)this, status); // this is dummy non-void m arker used for set semantics 81 result.put(id, (void*)this, status); // this is dummy non-void m arker used for set semantics
83 if (U_FAILURE(status)) { 82 if (U_FAILURE(status)) {
84 break; 83 break;
85 } 84 }
86 } 85 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 const Hashtable* 119 const Hashtable*
121 LocaleKeyFactory::getSupportedIDs(UErrorCode& /* status */) const { 120 LocaleKeyFactory::getSupportedIDs(UErrorCode& /* status */) const {
122 return NULL; 121 return NULL;
123 } 122 }
124 123
125 #ifdef SERVICE_DEBUG 124 #ifdef SERVICE_DEBUG
126 UnicodeString& 125 UnicodeString&
127 LocaleKeyFactory::debug(UnicodeString& result) const 126 LocaleKeyFactory::debug(UnicodeString& result) const
128 { 127 {
129 debugClass(result); 128 debugClass(result);
130 result.append(", name: "); 129 result.append((UnicodeString)", name: ");
131 result.append(_name); 130 result.append(_name);
132 result.append(", coverage: "); 131 result.append((UnicodeString)", coverage: ");
133 result.append(_coverage); 132 result.append(_coverage);
134 return result; 133 return result;
135 } 134 }
136 135
137 UnicodeString& 136 UnicodeString&
138 LocaleKeyFactory::debugClass(UnicodeString& result) const 137 LocaleKeyFactory::debugClass(UnicodeString& result) const
139 { 138 {
140 return result.append("LocaleKeyFactory"); 139 return result.append((UnicodeString)"LocaleKeyFactory");
141 } 140 }
142 #endif 141 #endif
143 142
144 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LocaleKeyFactory) 143 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(LocaleKeyFactory)
145 144
146 U_NAMESPACE_END 145 U_NAMESPACE_END
147 146
148 /* !UCONFIG_NO_SERVICE */ 147 /* !UCONFIG_NO_SERVICE */
149 #endif 148 #endif
150 149
151 150
OLDNEW
« no previous file with comments | « source/common/servlk.cpp ('k') | source/common/servnotf.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698