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

Side by Side Diff: source/i18n/reldatefmt.cpp

Issue 1621943002: ICU 56 step 4: Apply post-56 fixes for measure/date format (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@56goog
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/i18n/rbt_pars.cpp ('k') | source/i18n/standardplural.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) 2014, International Business Machines Corporation and 3 * Copyright (C) 2014-2015, International Business Machines Corporation and
4 * others. All Rights Reserved. 4 * others. All Rights Reserved.
5 ****************************************************************************** 5 ******************************************************************************
6 * 6 *
7 * File RELDATEFMT.CPP 7 * File reldatefmt.cpp
8 ****************************************************************************** 8 ******************************************************************************
9 */ 9 */
10 10
11 #include "unicode/reldatefmt.h" 11 #include "unicode/reldatefmt.h"
12 12
13 #if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_BREAK_ITERATION 13 #if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_BREAK_ITERATION
14 14
15 #include "unicode/localpointer.h" 15 #include "unicode/localpointer.h"
16 #include "quantityformatter.h" 16 #include "quantityformatter.h"
17 #include "unicode/plurrule.h" 17 #include "unicode/plurrule.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 for (int32_t i = 0; i < size; ++i) { 179 for (int32_t i = 0; i < size; ++i) {
180 LocalUResourceBundlePointer pluralBundle( 180 LocalUResourceBundlePointer pluralBundle(
181 ures_getByIndex(resource, i, NULL, &status)); 181 ures_getByIndex(resource, i, NULL, &status));
182 if (U_FAILURE(status)) { 182 if (U_FAILURE(status)) {
183 return; 183 return;
184 } 184 }
185 UnicodeString rawPattern; 185 UnicodeString rawPattern;
186 if (!getString(pluralBundle.getAlias(), rawPattern, status)) { 186 if (!getString(pluralBundle.getAlias(), rawPattern, status)) {
187 return; 187 return;
188 } 188 }
189 if (!formatter.add( 189 if (!formatter.addIfAbsent(
190 ures_getKey(pluralBundle.getAlias()), 190 ures_getKey(pluralBundle.getAlias()),
191 rawPattern, 191 rawPattern,
192 status)) { 192 status)) {
193 return; 193 return;
194 } 194 }
195 } 195 }
196 } 196 }
197 197
198 static void initRelativeUnit( 198 static void initRelativeUnit(
199 const UResourceBundle *resource, 199 const UResourceBundle *resource,
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 bi.orphan(); 892 bi.orphan();
893 SharedObject::copyPtr(shared, fOptBreakIterator); 893 SharedObject::copyPtr(shared, fOptBreakIterator);
894 } 894 }
895 } 895 }
896 896
897 897
898 U_NAMESPACE_END 898 U_NAMESPACE_END
899 899
900 #endif /* !UCONFIG_NO_FORMATTING */ 900 #endif /* !UCONFIG_NO_FORMATTING */
901 901
OLDNEW
« no previous file with comments | « source/i18n/rbt_pars.cpp ('k') | source/i18n/standardplural.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698