aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/icu/i18n/datefmt.cpp
diff options
context:
space:
mode:
authormcheshkov <mcheshkov@yandex-team.ru>2022-02-10 16:46:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:15 +0300
commite9d19cec64684c9c1e6b0c98297e5b895cf904fe (patch)
tree2768b1223e96a8a0610a93d18425d9647c1123c8 /contrib/libs/icu/i18n/datefmt.cpp
parent60040c91ffe701a84689b2c6310ff845e65cff42 (diff)
downloadydb-e9d19cec64684c9c1e6b0c98297e5b895cf904fe.tar.gz
Restoring authorship annotation for <mcheshkov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/icu/i18n/datefmt.cpp')
-rw-r--r--contrib/libs/icu/i18n/datefmt.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/contrib/libs/icu/i18n/datefmt.cpp b/contrib/libs/icu/i18n/datefmt.cpp
index a0e039cd50..aff92a8845 100644
--- a/contrib/libs/icu/i18n/datefmt.cpp
+++ b/contrib/libs/icu/i18n/datefmt.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
/*
*******************************************************************************
@@ -80,7 +80,7 @@ public:
fSkeleton(other.fSkeleton) { }
virtual ~DateFmtBestPatternKey();
virtual int32_t hashCode() const {
- return (int32_t)(37u * (uint32_t)LocaleCacheKey<DateFmtBestPattern>::hashCode() + (uint32_t)fSkeleton.hashCode());
+ return (int32_t)(37u * (uint32_t)LocaleCacheKey<DateFmtBestPattern>::hashCode() + (uint32_t)fSkeleton.hashCode());
}
virtual UBool operator==(const CacheKeyBase &other) const {
// reflexive
@@ -154,7 +154,7 @@ DateFormat& DateFormat::operator=(const DateFormat& other)
fCalendar = NULL;
}
if(other.fNumberFormat) {
- fNumberFormat = other.fNumberFormat->clone();
+ fNumberFormat = other.fNumberFormat->clone();
} else {
fNumberFormat = NULL;
}
@@ -460,15 +460,15 @@ DateFormat::createInstanceForSkeleton(
status = U_ILLEGAL_ARGUMENT_ERROR;
return NULL;
}
- Locale localeWithCalendar = locale;
- localeWithCalendar.setKeywordValue("calendar", calendar->getType(), status);
- if (U_FAILURE(status)) {
- return NULL;
- }
- DateFormat *result = createInstanceForSkeleton(skeleton, localeWithCalendar, status);
+ Locale localeWithCalendar = locale;
+ localeWithCalendar.setKeywordValue("calendar", calendar->getType(), status);
if (U_FAILURE(status)) {
return NULL;
}
+ DateFormat *result = createInstanceForSkeleton(skeleton, localeWithCalendar, status);
+ if (U_FAILURE(status)) {
+ return NULL;
+ }
result->adoptCalendar(calendar.orphan());
return result;
}
@@ -503,7 +503,7 @@ DateFormat* U_EXPORT2
DateFormat::create(EStyle timeStyle, EStyle dateStyle, const Locale& locale)
{
UErrorCode status = U_ZERO_ERROR;
-#if U_PLATFORM_USES_ONLY_WIN32_API
+#if U_PLATFORM_USES_ONLY_WIN32_API
char buffer[8];
int32_t count = locale.getKeywordValue("compat", buffer, sizeof(buffer), status);
@@ -591,14 +591,14 @@ DateFormat::adoptNumberFormat(NumberFormat* newNumberFormat)
delete fNumberFormat;
fNumberFormat = newNumberFormat;
newNumberFormat->setParseIntegerOnly(TRUE);
- newNumberFormat->setGroupingUsed(FALSE);
+ newNumberFormat->setGroupingUsed(FALSE);
}
//----------------------------------------------------------------------
void
DateFormat::setNumberFormat(const NumberFormat& newNumberFormat)
{
- NumberFormat* newNumFmtClone = newNumberFormat.clone();
+ NumberFormat* newNumFmtClone = newNumberFormat.clone();
if (newNumFmtClone != NULL) {
adoptNumberFormat(newNumFmtClone);
}
@@ -744,7 +744,7 @@ DateFormat::setBooleanAttribute(UDateFormatBooleanAttribute attr,
UBool
DateFormat::getBooleanAttribute(UDateFormatBooleanAttribute attr, UErrorCode &/*status*/) const {
- return static_cast<UBool>(fBoolFlags.get(attr));
+ return static_cast<UBool>(fBoolFlags.get(attr));
}
U_NAMESPACE_END