ICU-6726 Remove unneeded lower bound check in ICU4C
X-SVN-Rev: 25657
This commit is contained in:
parent
2ee407a70e
commit
a1a235b15e
@ -265,10 +265,7 @@ void RelativeDateFormat::loadDates(UErrorCode &status) {
|
||||
int32_t resStrLen = 0;
|
||||
|
||||
int32_t glueIndex = kDateTime;
|
||||
|
||||
if ((patternsSize > DateFormat::kDateTimeOffset) &&
|
||||
(patternsSize >= (DateFormat::kDateTimeOffset + DateFormat::kShort + 1))
|
||||
) {
|
||||
if (patternsSize >= (DateFormat::kDateTimeOffset + DateFormat::kShort + 1)) {
|
||||
// Get proper date time format
|
||||
switch (fDateStyle) {
|
||||
case kFullRelative:
|
||||
|
@ -573,8 +573,7 @@ void SimpleDateFormat::construct(EStyle timeStyle,
|
||||
|
||||
int32_t glueIndex = kDateTime;
|
||||
int32_t patternsSize = ures_getSize(dateTimePatterns);
|
||||
if ((patternsSize > kDateTimeOffset) &&
|
||||
(patternsSize >= (kDateTimeOffset + kShort + 1))) {
|
||||
if (patternsSize >= (kDateTimeOffset + kShort + 1)) {
|
||||
// Get proper date time format
|
||||
glueIndex = (int32_t)(kDateTimeOffset + (dateStyle - kDateOffset));
|
||||
}
|
||||
|
@ -76,8 +76,7 @@ UnicodeString* Win32DateFormat::getTimeDateFormat(const Calendar *cal, const Loc
|
||||
int32_t resStrLen = 0;
|
||||
int32_t glueIndex = DateFormat::kDateTime;
|
||||
int32_t patSize = ures_getSize(patBundle);
|
||||
if ((patSize > DateFormat::kDateTimeOffset) &&
|
||||
(patSize >= (DateFormat::kDateTimeOffset + DateFormat::kShort + 1))) {
|
||||
if (patSize >= (DateFormat::kDateTimeOffset + DateFormat::kShort + 1)) {
|
||||
// Get proper date time format
|
||||
glueIndex = (int32_t)(DateFormat::kDateTimeOffset + (fDateStyle - DateFormat::kDateOffset));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user