Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICU-22991 Remove unused private fIsSet #3319

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions icu4c/source/i18n/calendar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -1170,7 +1169,6 @@ Calendar::setTimeInMillis( double millis, UErrorCode& status ) {
for (int32_t i=0; i<UCAL_FIELD_COUNT; ++i) {
fFields[i] = 0;
fStamp[i] = kUnset;
fIsSet[i] = false;
}


Expand Down Expand Up @@ -1213,7 +1211,6 @@ Calendar::set(UCalendarDateFields field, int32_t value)
recalculateStamp();
}
fStamp[field] = fNextStamp++;
fIsSet[field] = true; // Remove later
fIsTimeSet = fAreFieldsSet = fAreFieldsVirtuallySet = false;
}

Expand Down Expand Up @@ -1273,7 +1270,6 @@ Calendar::clear()
for (int32_t i=0; i<UCAL_FIELD_COUNT; ++i) {
fFields[i] = 0; // Must do this; other code depends on it
fStamp[i] = kUnset;
fIsSet[i] = false; // Remove later
}
fIsTimeSet = fAreFieldsSet = fAreAllFieldsSet = fAreFieldsVirtuallySet = false;
// fTime is not 'cleared' - may be used if no fields are set.
Expand All @@ -1296,12 +1292,10 @@ Calendar::clear(UCalendarDateFields field)
if (field == UCAL_MONTH) {
fFields[UCAL_ORDINAL_MONTH] = 0;
fStamp[UCAL_ORDINAL_MONTH] = kUnset;
fIsSet[UCAL_ORDINAL_MONTH] = false; // Remove later
}
if (field == UCAL_ORDINAL_MONTH) {
fFields[UCAL_MONTH] = 0;
fStamp[UCAL_MONTH] = kUnset;
fIsSet[UCAL_MONTH] = false; // Remove later
}
fIsTimeSet = fAreFieldsSet = fAreAllFieldsSet = fAreFieldsVirtuallySet = false;
}
Expand Down Expand Up @@ -1434,10 +1428,8 @@ void Calendar::computeFields(UErrorCode &ec)
for (int32_t i=0; i<UCAL_FIELD_COUNT; ++i) {
if ((mask & 1) == 0) {
fStamp[i] = kInternallySet;
fIsSet[i] = true; // Remove later
} else {
fStamp[i] = kUnset;
fIsSet[i] = false; // Remove later
}
mask >>= 1;
}
Expand Down
7 changes: 0 additions & 7 deletions icu4c/source/i18n/unicode/calendar.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -2552,7 +2546,6 @@ Calendar::internalSet(UCalendarDateFields field, int32_t value)
{
fFields[field] = value;
fStamp[field] = kInternallySet;
fIsSet[field] = true; // Remove later
}

/**
Expand Down