don't check twice, thanks Marten Svanfeldt
>>2. reserve(int) method check capacity() < _Count twice.
This commit is contained in:
@@ -216,8 +216,6 @@ class btAlignedObjectArray
|
|||||||
{ // determine new minimum length of allocated storage
|
{ // determine new minimum length of allocated storage
|
||||||
if (capacity() < _Count)
|
if (capacity() < _Count)
|
||||||
{ // not enough room, reallocate
|
{ // not enough room, reallocate
|
||||||
if (capacity() < _Count)
|
|
||||||
{
|
|
||||||
T* s = (T*)allocate(_Count);
|
T* s = (T*)allocate(_Count);
|
||||||
|
|
||||||
copy(0, size(), s);
|
copy(0, size(), s);
|
||||||
@@ -232,7 +230,6 @@ class btAlignedObjectArray
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class less
|
class less
|
||||||
|
|||||||
Reference in New Issue
Block a user