From 841e88bc8cc3c470f7743f6557beb98814b1aea3 Mon Sep 17 00:00:00 2001 From: Frank Tang Date: Mon, 23 Dec 2024 14:15:18 -0800 Subject: [PATCH] ICU-22991 Remove unused private fIsSet This field is removed in Java 24 years ago. Save 24 bytes per Calendar object. --- icu4c/source/i18n/calendar.cpp | 8 -------- icu4c/source/i18n/unicode/calendar.h | 7 ------- 2 files changed, 15 deletions(-) diff --git a/icu4c/source/i18n/calendar.cpp b/icu4c/source/i18n/calendar.cpp index 637e7f84c40d..ca3de520c8f2 100644 --- a/icu4c/source/i18n/calendar.cpp +++ b/icu4c/source/i18n/calendar.cpp @@ -806,7 +806,6 @@ Calendar::operator=(const Calendar &right) { if (this != &right) { uprv_arrayCopy(right.fFields, fFields, UCAL_FIELD_COUNT); - uprv_arrayCopy(right.fIsSet, fIsSet, UCAL_FIELD_COUNT); uprv_arrayCopy(right.fStamp, fStamp, UCAL_FIELD_COUNT); fTime = right.fTime; fIsTimeSet = right.fIsTimeSet; @@ -1170,7 +1169,6 @@ Calendar::setTimeInMillis( double millis, UErrorCode& status ) { for (int32_t i=0; i>= 1; } diff --git a/icu4c/source/i18n/unicode/calendar.h b/icu4c/source/i18n/unicode/calendar.h index b965ca381e87..1d2104be607d 100644 --- a/icu4c/source/i18n/unicode/calendar.h +++ b/icu4c/source/i18n/unicode/calendar.h @@ -1937,12 +1937,6 @@ class U_I18N_API Calendar : public UObject { */ int32_t fFields[UCAL_FIELD_COUNT]; -private: - /** - * The flags which tell if a specified time field for the calendar is set. - */ - UBool fIsSet[UCAL_FIELD_COUNT]; - protected: /** Special values of stamp[] * @stable ICU 2.0 @@ -2552,7 +2546,6 @@ Calendar::internalSet(UCalendarDateFields field, int32_t value) { fFields[field] = value; fStamp[field] = kInternallySet; - fIsSet[field] = true; // Remove later } /**