diff options
author | mcheshkov <mcheshkov@yandex-team.ru> | 2022-02-10 16:46:16 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:16 +0300 |
commit | 1312621288956f199a5bd5342b0133d4395fa725 (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /contrib/libs/icu/common/usprep.cpp | |
parent | e9d19cec64684c9c1e6b0c98297e5b895cf904fe (diff) | |
download | ydb-1312621288956f199a5bd5342b0133d4395fa725.tar.gz |
Restoring authorship annotation for <mcheshkov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/icu/common/usprep.cpp')
-rw-r--r-- | contrib/libs/icu/common/usprep.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/contrib/libs/icu/common/usprep.cpp b/contrib/libs/icu/common/usprep.cpp index 8369c91265..8351a77370 100644 --- a/contrib/libs/icu/common/usprep.cpp +++ b/contrib/libs/icu/common/usprep.cpp @@ -1,4 +1,4 @@ -// © 2016 and later: Unicode, Inc. and others. +// © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html /* ******************************************************************************* @@ -8,7 +8,7 @@ * ******************************************************************************* * file name: usprep.cpp - * encoding: UTF-8 + * encoding: UTF-8 * tab size: 8 (not used) * indentation:4 * @@ -45,9 +45,9 @@ U_CDECL_BEGIN Static cache for already opened StringPrep profiles */ static UHashtable *SHARED_DATA_HASHTABLE = NULL; -static icu::UInitOnce gSharedDataInitOnce = U_INITONCE_INITIALIZER; +static icu::UInitOnce gSharedDataInitOnce = U_INITONCE_INITIALIZER; -static UMutex usprepMutex; +static UMutex usprepMutex; /* format version of spp file */ //static uint8_t formatVersion[4]={ 0, 0, 0, 0 }; @@ -111,9 +111,9 @@ hashEntry(const UHashTok parm) { UHashTok namekey, pathkey; namekey.pointer = b->name; pathkey.pointer = b->path; - uint32_t unsignedHash = static_cast<uint32_t>(uhash_hashChars(namekey)) + - 37u * static_cast<uint32_t>(uhash_hashChars(pathkey)); - return static_cast<int32_t>(unsignedHash); + uint32_t unsignedHash = static_cast<uint32_t>(uhash_hashChars(namekey)) + + 37u * static_cast<uint32_t>(uhash_hashChars(pathkey)); + return static_cast<int32_t>(unsignedHash); } /* compares two entries */ @@ -352,9 +352,9 @@ usprep_getProfile(const char* path, LocalMemory<char> keyName; LocalMemory<char> keyPath; if( key.allocateInsteadAndReset() == NULL || - keyName.allocateInsteadAndCopy(static_cast<int32_t>(uprv_strlen(name)+1)) == NULL || + keyName.allocateInsteadAndCopy(static_cast<int32_t>(uprv_strlen(name)+1)) == NULL || (path != NULL && - keyPath.allocateInsteadAndCopy(static_cast<int32_t>(uprv_strlen(path)+1)) == NULL) + keyPath.allocateInsteadAndCopy(static_cast<int32_t>(uprv_strlen(path)+1)) == NULL) ) { *status = U_MEMORY_ALLOCATION_ERROR; usprep_unload(newProfile.getAlias()); @@ -727,12 +727,12 @@ usprep_prepare( const UStringPrepProfile* profile, ((result < _SPREP_TYPE_THRESHOLD) && (result & 0x01) /* first bit says it the code point is prohibited*/) ){ *status = U_STRINGPREP_PROHIBITED_ERROR; - uprv_syntaxError(b2, b2Index-U16_LENGTH(ch), b2Len, parseError); + uprv_syntaxError(b2, b2Index-U16_LENGTH(ch), b2Len, parseError); return 0; } if(profile->checkBiDi) { - direction = ubidi_getClass(ch); + direction = ubidi_getClass(ch); if(firstCharDir == U_CHAR_DIRECTION_COUNT){ firstCharDir = direction; } |