X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/51004dcb01e06fef634b61be77ed73dd61cb6db9..4f1e1a09ce4daed860e35d359ce2fceccb0764e8:/icuSources/common/ucharstriebuilder.cpp diff --git a/icuSources/common/ucharstriebuilder.cpp b/icuSources/common/ucharstriebuilder.cpp index 05255b48..049997a2 100644 --- a/icuSources/common/ucharstriebuilder.cpp +++ b/icuSources/common/ucharstriebuilder.cpp @@ -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 -* encoding: US-ASCII +* encoding: UTF-8 * 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) { - uprv_memcpy(newElements, elements, elementsLength*sizeof(UCharsTrieElement)); + uprv_memcpy(newElements, elements, (size_t)elementsLength*sizeof(UCharsTrieElement)); } delete[] elements; elements=newElements; @@ -285,7 +287,7 @@ UCharsTrieBuilder::indexOfElementWithNextUnit(int32_t i, int32_t unitIndex, UCha UCharsTrieBuilder::UCTLinearMatchNode::UCTLinearMatchNode(const UChar *units, int32_t len, Node *nextNode) : LinearMatchNode(len, nextNode), s(units) { - hash=hash*37+ustr_hashUCharsN(units, len); + hash=hash*37u+ustr_hashUCharsN(units, len); } UBool