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

Unified Diff: source/common/uniset.cpp

Issue 2440913002: Update ICU to 58.1
Patch Set: Created 4 years, 2 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/unifunct.cpp ('k') | source/common/uniset_closure.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/common/uniset.cpp
diff --git a/source/common/uniset.cpp b/source/common/uniset.cpp
index a305ad41292a7b04a1f9695f419d94f9af3e8db8..7866719a171c4af9108ff01ee54b55385e11ed14 100644
--- a/source/common/uniset.cpp
+++ b/source/common/uniset.cpp
@@ -1,3 +1,5 @@
+// Copyright (C) 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
**********************************************************************
* Copyright (C) 1999-2015, International Business Machines
@@ -234,7 +236,7 @@ UnicodeSet::UnicodeSet(const UnicodeSet& o, UBool /* asThawed */) :
if(list!=NULL){
// *this = o except for bmpSet and stringSpan
len = o.len;
- uprv_memcpy(list, o.list, len*sizeof(UChar32));
+ uprv_memcpy(list, o.list, (size_t)len*sizeof(UChar32));
if (strings != NULL && o.strings != NULL) {
strings->assign(*o.strings, cloneUnicodeString, status);
} else { // Invalid strings.
@@ -286,7 +288,7 @@ UnicodeSet& UnicodeSet::operator=(const UnicodeSet& o) {
return *this; // There is no way to report this error :-(
}
len = o.len;
- uprv_memcpy(list, o.list, len*sizeof(UChar32));
+ uprv_memcpy(list, o.list, (size_t)len*sizeof(UChar32));
if (o.bmpSet == NULL) {
bmpSet = NULL;
} else {
@@ -1253,14 +1255,14 @@ UnicodeSet& UnicodeSet::complement(void) {
if (U_FAILURE(status)) {
return *this;
}
- uprv_memcpy(buffer, list + 1, (len-1)*sizeof(UChar32));
+ uprv_memcpy(buffer, list + 1, (size_t)(len-1)*sizeof(UChar32));
--len;
} else {
ensureBufferCapacity(len+1, status);
if (U_FAILURE(status)) {
return *this;
}
- uprv_memcpy(buffer + 1, list, len*sizeof(UChar32));
+ uprv_memcpy(buffer + 1, list, (size_t)len*sizeof(UChar32));
buffer[0] = UNICODESET_LOW;
++len;
}
« no previous file with comments | « source/common/unifunct.cpp ('k') | source/common/uniset_closure.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698