From 3a29de3a3cfe6de7f1b1dbec81f958128d0730e9 Mon Sep 17 00:00:00 2001 From: Denis Silakov Date: Wed, 13 Nov 2024 22:40:14 +0300 Subject: [PATCH] Adopt for new icu version Signed-off-by: Denis Silakov --- runtime/js_date_time_format.cpp | 6 +++--- runtime/js_locale.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/runtime/js_date_time_format.cpp b/runtime/js_date_time_format.cpp index 425243b65..08b1335df 100644 --- a/runtime/js_date_time_format.cpp +++ b/runtime/js_date_time_format.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -824,8 +824,8 @@ void JSDateTimeFormat::ResolvedOptions(JSThread *thread, const JSHandle(canonicalTimezone == UNICODE_STRING_SIMPLE("Etc/UTC")) != 0 || + static_cast(canonicalTimezone == UNICODE_STRING_SIMPLE("Etc/GMT")) != 0) { timezoneValue.Update(globalConst->GetUTCString()); } else { timezoneValue.Update(JSLocale::IcuToString(thread, canonicalTimezone).GetTaggedValue()); diff --git a/runtime/js_locale.cpp b/runtime/js_locale.cpp index 4a9debeb6..98c6de8d0 100644 --- a/runtime/js_locale.cpp +++ b/runtime/js_locale.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -113,7 +113,7 @@ bool JSLocale::IsValidTimeZoneName(const icu::TimeZone &tz) tz.getID(id); icu::UnicodeString canonical; icu::TimeZone::getCanonicalID(id, canonical, status); - UBool canonicalFlag = (canonical != icu::UnicodeString("Etc/Unknown", -1, US_INV)); + UBool canonicalFlag = static_cast(canonical != icu::UnicodeString("Etc/Unknown", -1, US_INV)); return (U_SUCCESS(status) != 0) && (canonicalFlag != 0); } -- Gitee