From 9f3feed545bf6acf6c9811c125e2c17b9e9d4a3e Mon Sep 17 00:00:00 2001 From: Frank Tang Date: Wed, 21 Sep 2022 19:53:29 -0700 Subject: [PATCH] ICU-22160 clean up Calendar code Remove unnecessary BuddhistCalendar::handleComputeMonthStart Remove unnecessary include --- icu4c/source/i18n/buddhcal.cpp | 7 ------- icu4c/source/i18n/buddhcal.h | 15 --------------- icu4c/source/i18n/hebrwcal.cpp | 4 ++-- icu4c/source/i18n/indiancal.cpp | 1 - 4 files changed, 2 insertions(+), 25 deletions(-) diff --git a/icu4c/source/i18n/buddhcal.cpp b/icu4c/source/i18n/buddhcal.cpp index de304129cb4..dc14af00bf9 100644 --- a/icu4c/source/i18n/buddhcal.cpp +++ b/icu4c/source/i18n/buddhcal.cpp @@ -78,13 +78,6 @@ int32_t BuddhistCalendar::handleGetExtendedYear() return year; } -int32_t BuddhistCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, - - UBool useMonth) const -{ - return GregorianCalendar::handleComputeMonthStart(eyear, month, useMonth); -} - void BuddhistCalendar::handleComputeFields(int32_t julianDay, UErrorCode& status) { GregorianCalendar::handleComputeFields(julianDay, status); diff --git a/icu4c/source/i18n/buddhcal.h b/icu4c/source/i18n/buddhcal.h index 2ef5c524935..dba4111129b 100644 --- a/icu4c/source/i18n/buddhcal.h +++ b/icu4c/source/i18n/buddhcal.h @@ -157,21 +157,6 @@ private: * @internal */ virtual int32_t handleGetLimit(UCalendarDateFields field, ELimitType limitType) const override; - /** - * Return the Julian day number of day before the first day of the - * given month in the given extended year. Subclasses should override - * this method to implement their calendar system. - * @param eyear the extended year - * @param month the zero-based month, or 0 if useMonth is false - * @param useMonth if false, compute the day before the first day of - * the given year, otherwise, compute the day before the first day of - * the given month - * @param return the Julian day number of the day before the first - * day of the given month and year - * @internal - */ - virtual int32_t handleComputeMonthStart(int32_t eyear, int32_t month, - UBool useMonth) const override; /** * Returns true because the Buddhist Calendar does have a default century diff --git a/icu4c/source/i18n/hebrwcal.cpp b/icu4c/source/i18n/hebrwcal.cpp index b3e6bcb65c3..7e8da3eb2fb 100644 --- a/icu4c/source/i18n/hebrwcal.cpp +++ b/icu4c/source/i18n/hebrwcal.cpp @@ -22,8 +22,8 @@ #include "cmemory.h" #include "umutex.h" #include -#include "gregoimp.h" // Math -#include "astro.h" // CalendarAstronomer +#include "gregoimp.h" // ClockMath +#include "astro.h" // CalendarCache #include "uhash.h" #include "ucln_in.h" diff --git a/icu4c/source/i18n/indiancal.cpp b/icu4c/source/i18n/indiancal.cpp index 935290a5751..24919e394f6 100644 --- a/icu4c/source/i18n/indiancal.cpp +++ b/icu4c/source/i18n/indiancal.cpp @@ -16,7 +16,6 @@ #include "mutex.h" #include #include "gregoimp.h" // Math -#include "astro.h" // CalendarAstronomer #include "uhash.h" // Debugging -- 2.40.0