зеркало из https://github.com/mozilla/pjs.git
Bug 361707. nsTArray::SetCapacity should return boolean success/failure. r+sr=sicking
This commit is contained in:
Родитель
cf709a9345
Коммит
4482b64219
|
@ -588,8 +588,9 @@ class nsTArray : public nsTArray_base {
|
||||||
// AppendElement operations to minimize heap re-allocations. This method
|
// AppendElement operations to minimize heap re-allocations. This method
|
||||||
// will not reduce the number of elements in this array.
|
// will not reduce the number of elements in this array.
|
||||||
// @param capacity The desired capacity of this array.
|
// @param capacity The desired capacity of this array.
|
||||||
void SetCapacity(size_type capacity) {
|
// @return True if the operation succeeded; false if we ran out of memory
|
||||||
EnsureCapacity(capacity, sizeof(elem_type));
|
PRBool SetCapacity(size_type capacity) {
|
||||||
|
return EnsureCapacity(capacity, sizeof(elem_type));
|
||||||
}
|
}
|
||||||
|
|
||||||
// This method modifies the length of the array. If the new length is
|
// This method modifies the length of the array. If the new length is
|
||||||
|
|
Загрузка…
Ссылка в новой задаче