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

Unified Diff: source/common/ustrenum.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/common/ustrenum.h ('k') | source/common/utext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/common/ustrenum.cpp
diff --git a/source/common/ustrenum.cpp b/source/common/ustrenum.cpp
index dd7fe78a3a21460187ea74e24503c915c1ea0edf..762bf99d517105bea149f0ffb7032c11355de9d6 100644
--- a/source/common/ustrenum.cpp
+++ b/source/common/ustrenum.cpp
@@ -1,6 +1,6 @@
/*
**********************************************************************
-* Copyright (c) 2002-2012, International Business Machines
+* Copyright (c) 2002-2014, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* Author: Alan Liu
@@ -130,6 +130,22 @@ StringEnumeration::operator!=(const StringEnumeration& that)const {
// UStringEnumeration implementation --------------------------------------- ***
+UStringEnumeration * U_EXPORT2
+UStringEnumeration::fromUEnumeration(
+ UEnumeration *uenumToAdopt, UErrorCode &status) {
+ if (U_FAILURE(status)) {
+ uenum_close(uenumToAdopt);
+ return NULL;
+ }
+ UStringEnumeration *result = new UStringEnumeration(uenumToAdopt);
+ if (result == NULL) {
+ status = U_MEMORY_ALLOCATION_ERROR;
+ uenum_close(uenumToAdopt);
+ return NULL;
+ }
+ return result;
+}
+
UStringEnumeration::UStringEnumeration(UEnumeration* _uenum) :
uenum(_uenum) {
U_ASSERT(_uenum != 0);
« no previous file with comments | « source/common/ustrenum.h ('k') | source/common/utext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698