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

Side by Side Diff: source/common/uvectr32.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/utypes.c ('k') | source/common/uvectr64.cpp » ('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) 1999-2010, International Business Machines Corporation and * 3 * Copyright (C) 1999-2015, International Business Machines Corporation and
4 * others. All Rights Reserved. * 4 * others. All Rights Reserved.
5 ****************************************************************************** 5 ******************************************************************************
6 * Date Name Description 6 * Date Name Description
7 * 10/22/99 alan Creation. 7 * 10/22/99 alan Creation.
8 ********************************************************************** 8 **********************************************************************
9 */ 9 */
10 10
11 #include "uvectr32.h" 11 #include "uvectr32.h"
12 #include "cmemory.h" 12 #include "cmemory.h"
13 #include "putilimp.h" 13 #include "putilimp.h"
14 14
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 for (i=startIndex; i<count; ++i) { 189 for (i=startIndex; i<count; ++i) {
190 if (key == elements[i]) { 190 if (key == elements[i]) {
191 return i; 191 return i;
192 } 192 }
193 } 193 }
194 return -1; 194 return -1;
195 } 195 }
196 196
197 197
198 UBool UVector32::expandCapacity(int32_t minimumCapacity, UErrorCode &status) { 198 UBool UVector32::expandCapacity(int32_t minimumCapacity, UErrorCode &status) {
199 if (U_FAILURE(status)) {
200 return FALSE;
201 }
199 if (minimumCapacity < 0) { 202 if (minimumCapacity < 0) {
200 status = U_ILLEGAL_ARGUMENT_ERROR; 203 status = U_ILLEGAL_ARGUMENT_ERROR;
201 return FALSE; 204 return FALSE;
202 } 205 }
203 if (capacity >= minimumCapacity) { 206 if (capacity >= minimumCapacity) {
204 return TRUE; 207 return TRUE;
205 } 208 }
206 if (maxCapacity>0 && minimumCapacity>maxCapacity) { 209 if (maxCapacity>0 && minimumCapacity>maxCapacity) {
207 status = U_BUFFER_OVERFLOW_ERROR; 210 status = U_BUFFER_OVERFLOW_ERROR;
208 return FALSE; 211 return FALSE;
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 ++count; 324 ++count;
322 } 325 }
323 } 326 }
324 327
325 328
326 329
327 330
328 331
329 U_NAMESPACE_END 332 U_NAMESPACE_END
330 333
OLDNEW
« no previous file with comments | « source/common/utypes.c ('k') | source/common/uvectr64.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698