mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 00:43:32 +00:00
ICU-7947 Fix previous checkin, expandCapacity allows minimumCapacity=0
X-SVN-Rev: 28628
This commit is contained in:
parent
467cf876fc
commit
a3a500f892
3 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue