mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-06 22:15:31 +00:00
ICU-11001 STRING_HASH changed to use uint32_t in computation.
X-SVN-Rev: 36016
This commit is contained in:
parent
38b83477bf
commit
47a28993e7
1 changed files with 3 additions and 3 deletions
|
@ -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<int32_t>(hash)
|
||||
|
||||
/* Used by UnicodeString to compute its hashcode - Not public API. */
|
||||
U_CAPI int32_t U_EXPORT2
|
||||
|
|
Loading…
Add table
Reference in a new issue