From 47a28993e726c95acb9ec8cc0796af2e1b3067ed Mon Sep 17 00:00:00 2001 From: Andy Heninger Date: Wed, 9 Jul 2014 22:02:52 +0000 Subject: [PATCH] ICU-11001 STRING_HASH changed to use uint32_t in computation. X-SVN-Rev: 36016 --- icu4c/source/common/ustring.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/icu4c/source/common/ustring.cpp b/icu4c/source/common/ustring.cpp index dd4f727ba1a..40d23c06aea 100644 --- a/icu4c/source/common/ustring.cpp +++ b/icu4c/source/common/ustring.cpp @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 1998-2012, International Business Machines +* Copyright (C) 1998-2014, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -1486,7 +1486,7 @@ u_terminateWChars(wchar_t *dest, int32_t destCapacity, int32_t length, UErrorCod */ #define STRING_HASH(TYPE, STR, STRLEN, DEREF) \ - int32_t hash = 0; \ + uint32_t hash = 0; \ const TYPE *p = (const TYPE*) STR; \ if (p != NULL) { \ int32_t len = (int32_t)(STRLEN); \ @@ -1497,7 +1497,7 @@ u_terminateWChars(wchar_t *dest, int32_t destCapacity, int32_t length, UErrorCod p += inc; \ } \ } \ - return hash + return static_cast(hash) /* Used by UnicodeString to compute its hashcode - Not public API. */ U_CAPI int32_t U_EXPORT2