ICU-6726 Remove unneeded lower bound check in ICU4C

X-SVN-Rev: 25657
This commit is contained in:
Jason Spieth 2009-03-26 19:06:50 +00:00
parent 2ee407a70e
commit a1a235b15e
3 changed files with 3 additions and 8 deletions

View File

@ -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:

View File

@ -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));
}

View File

@ -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));
}