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/i18n/tzgnames.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/i18n/tzgnames.cpp')
-rw-r--r-- | contrib/libs/icu/i18n/tzgnames.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/contrib/libs/icu/i18n/tzgnames.cpp b/contrib/libs/icu/i18n/tzgnames.cpp index 94d00d7e8d..e056461dc3 100644 --- a/contrib/libs/icu/i18n/tzgnames.cpp +++ b/contrib/libs/icu/i18n/tzgnames.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 /* ******************************************************************************* @@ -18,18 +18,18 @@ #include "unicode/rbtz.h" #include "unicode/simpleformatter.h" #include "unicode/simpletz.h" -#include "unicode/strenum.h" +#include "unicode/strenum.h" #include "unicode/vtzone.h" -#include "bytesinkutil.h" -#include "charstr.h" +#include "bytesinkutil.h" +#include "charstr.h" #include "cmemory.h" #include "cstring.h" #include "mutex.h" #include "uhash.h" #include "uassert.h" #include "umutex.h" -#include "ulocimp.h" +#include "ulocimp.h" #include "uresimp.h" #include "ureslocs.h" #include "zonemeta.h" @@ -272,7 +272,7 @@ GNameSearchHandler::getMatches(int32_t& maxMatchLen) { return results; } -static UMutex gLock; +static UMutex gLock; class TZGNCore : public UMemory { public: @@ -410,15 +410,15 @@ TZGNCore::initialize(const Locale& locale, UErrorCode& status) { // target region const char* region = fLocale.getCountry(); - int32_t regionLen = static_cast<int32_t>(uprv_strlen(region)); + int32_t regionLen = static_cast<int32_t>(uprv_strlen(region)); if (regionLen == 0) { - CharString loc; - { - CharStringByteSink sink(&loc); - ulocimp_addLikelySubtags(fLocale.getName(), sink, &status); - } + CharString loc; + { + CharStringByteSink sink(&loc); + ulocimp_addLikelySubtags(fLocale.getName(), sink, &status); + } - regionLen = uloc_getCountry(loc.data(), fTargetRegion, sizeof(fTargetRegion), &status); + regionLen = uloc_getCountry(loc.data(), fTargetRegion, sizeof(fTargetRegion), &status); if (U_SUCCESS(status)) { fTargetRegion[regionLen] = 0; } else { @@ -621,7 +621,7 @@ TZGNCore::formatGenericNonLocationName(const TimeZone& tz, UTimeZoneGenericNameT UErrorCode status = U_ZERO_ERROR; UBool useStandard = FALSE; int32_t raw, sav; - UChar tmpNameBuf[ZONE_NAME_U16_MAX]; + UChar tmpNameBuf[ZONE_NAME_U16_MAX]; tz.getOffset(date, FALSE, raw, sav, status); if (U_FAILURE(status)) { @@ -689,7 +689,7 @@ TZGNCore::formatGenericNonLocationName(const TimeZone& tz, UTimeZoneGenericNameT // for some meta zones in some locales. This looks like a data bugs. // For now, we check if the standard name is different from its generic // name below. - UChar genNameBuf[ZONE_NAME_U16_MAX]; + UChar genNameBuf[ZONE_NAME_U16_MAX]; UnicodeString mzGenericName(genNameBuf, 0, UPRV_LENGTHOF(genNameBuf)); fTimeZoneNames->getMetaZoneDisplayName(mzID, nameType, mzGenericName); if (stdName.caseCompare(mzGenericName, 0) == 0) { @@ -862,7 +862,7 @@ TZGNCore::loadStrings(const UnicodeString& tzCanonicalID) { }; StringEnumeration *mzIDs = fTimeZoneNames->getAvailableMetaZoneIDs(tzCanonicalID, status); - while ((mzID = mzIDs->snext(status)) != NULL) { + while ((mzID = mzIDs->snext(status)) != NULL) { if (U_FAILURE(status)) { break; } @@ -1050,7 +1050,7 @@ TZGNCore::findLocal(const UnicodeString& text, int32_t start, uint32_t types, UE StringEnumeration *tzIDs = TimeZone::createTimeZoneIDEnumeration(UCAL_ZONE_TYPE_CANONICAL, NULL, NULL, status); if (U_SUCCESS(status)) { const UnicodeString *tzID; - while ((tzID = tzIDs->snext(status)) != NULL) { + while ((tzID = tzIDs->snext(status)) != NULL) { if (U_FAILURE(status)) { break; } @@ -1118,7 +1118,7 @@ typedef struct TZGNCoreRef { } TZGNCoreRef; // TZGNCore object cache handling -static UMutex gTZGNLock; +static UMutex gTZGNLock; static UHashtable *gTZGNCoreCache = NULL; static UBool gTZGNCoreCacheInitialized = FALSE; @@ -1170,7 +1170,7 @@ static void sweepCache() { const UHashElement* elem; double now = (double)uprv_getUTCtime(); - while ((elem = uhash_nextElement(gTZGNCoreCache, &pos)) != NULL) { + while ((elem = uhash_nextElement(gTZGNCoreCache, &pos)) != NULL) { TZGNCoreRef *entry = (TZGNCoreRef *)elem->value.pointer; if (entry->refCount <= 0 && (now - entry->lastAccess) > CACHE_EXPIRATION) { // delete this entry |