]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/ucharstriebuilder.cpp
ICU-59152.0.1.tar.gz
[apple/icu.git] / icuSources / common / ucharstriebuilder.cpp
index 05255b48c9b3c88323defb5fa0ee45c9ad6ef25b..694648d0c811f76b9dd03a22618db0dd1bf5ad2c 100644 (file)
@@ -1,10 +1,12 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /*
 *******************************************************************************
 *   Copyright (C) 2010-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *******************************************************************************
 *   file name:  ucharstriebuilder.h
 /*
 *******************************************************************************
 *   Copyright (C) 2010-2012, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *******************************************************************************
 *   file name:  ucharstriebuilder.h
-*   encoding:   US-ASCII
+*   encoding:   UTF-8
 *   tab size:   8 (not used)
 *   indentation:4
 *
 *   tab size:   8 (not used)
 *   indentation:4
 *
@@ -115,7 +117,7 @@ UCharsTrieBuilder::add(const UnicodeString &s, int32_t value, UErrorCode &errorC
             return *this;
         }
         if(elementsLength>0) {
             return *this;
         }
         if(elementsLength>0) {
-            uprv_memcpy(newElements, elements, elementsLength*sizeof(UCharsTrieElement));
+            uprv_memcpy(newElements, elements, (size_t)elementsLength*sizeof(UCharsTrieElement));
         }
         delete[] elements;
         elements=newElements;
         }
         delete[] elements;
         elements=newElements;