#include <NCollection_BaseMap.hxx>
#include <TCollection.hxx>
-#include <Standard_Assert.hxx>
//=======================================================================
//function : BeginResize
{
// get next size for the buckets array
N = NextPrimeForMap(NbBuckets);
- Standard_ASSERT (N > NbBuckets, "NextPrimeForMap failed to return valid number", return Standard_False);
-
+ if (N <= myNbBuckets)
+ {
+ if (!myData1)
+ N = myNbBuckets;
+ else
+ return Standard_False;
+ }
data1 = (NCollection_ListNode **)
myAllocator->Allocate((N+1)*sizeof(NCollection_ListNode *));
memset(data1, 0, (N+1)*sizeof(NCollection_ListNode *));