ICU-7947 Fix previous checkin, expandCapacity allows minimumCapacity=0

X-SVN-Rev: 28628
This commit is contained in:
Michael Grady 2010-09-16 02:05:19 +00:00
parent 467cf876fc
commit a3a500f892
3 changed files with 3 additions and 3 deletions

View file

@ -326,7 +326,7 @@ int32_t UVector::indexOf(UHashTok key, int32_t startIndex, int8_t hint) const {
}
UBool UVector::ensureCapacity(int32_t minimumCapacity, UErrorCode &status) {
if (minimumCapacity < 1) {
if (minimumCapacity < 0) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return FALSE;
}

View file

@ -196,7 +196,7 @@ int32_t UVector32::indexOf(int32_t key, int32_t startIndex) const {
UBool UVector32::expandCapacity(int32_t minimumCapacity, UErrorCode &status) {
if (minimumCapacity < 1) {
if (minimumCapacity < 0) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return FALSE;
}

View file

@ -114,7 +114,7 @@ void UVector64::removeAllElements(void) {
}
UBool UVector64::expandCapacity(int32_t minimumCapacity, UErrorCode &status) {
if (minimumCapacity < 1) {
if (minimumCapacity < 0) {
status = U_ILLEGAL_ARGUMENT_ERROR;
return FALSE;
}