- Fixed: Conversion of c_bind.cpp to FString was incomplete.

- Fixed some functions that were declared as taking size_t's but defined as taking
  unsigned ints.
- Added a dummy object to delete sound environments on exit.
- Fixed: FWarpTexture did not delete its Spans when destroyed.
- Changed wadclusterinfos and wadlevelinfos arrays into TArrays.
- Added the TypeInfo::AutoTypeInfoPtr for TypeInfo::m_RuntimeActors so they can
  be automatically deleted.
- Changed TypeInfo::m_Types into a TArray so it will be automatically deleted
  on exit.
- Fixed: TArray::Resize() did not deconstruct entries when shrinking the array.
- Changed TArray::Push() so that it calls Grow() instead of duplicating the growth
  calculations itself.
- Calling TArray::Grow() for a small amount when the array is short should grow it
  a bit more than it was doing.

SVN r76 (trunk)
This commit is contained in:
Randy Heit 2006-05-04 06:14:52 +00:00
commit fe84b6077e
22 changed files with 155 additions and 139 deletions

View file

@ -125,11 +125,7 @@ public:
}
unsigned int Push (const T &item)
{
if (Count >= Most)
{
Most = (Most >= 16) ? Most + Most / 2 : 16;
DoResize ();
}
Grow (1);
ConstructInTArray (&Array[Count], item);
return Count++;
}
@ -209,7 +205,7 @@ public:
if (Count + amount > Most)
{
const unsigned int choicea = Count + amount;
const unsigned int choiceb = Most + Most/2;
const unsigned int choiceb = Most = (Most >= 16) ? Most + Most / 2 : 16;
Most = (choicea > choiceb ? choicea : choiceb);
DoResize ();
}
@ -219,11 +215,17 @@ public:
{
if (Count < amount)
{
// Adding new entries
Grow (amount - Count);
for (unsigned int i = Count; i < amount; ++i)
{
ConstructEmptyInTArray (&Array[i]);
}
}
for (unsigned int i = Count; i < amount; ++i)
else if (Count != amount)
{
ConstructEmptyInTArray (&Array[i]);
// Deleting old entries
DoDelete (amount, Count - 1);
}
Count = amount;
}
@ -231,10 +233,7 @@ public:
// with them.
unsigned int Reserve (unsigned int amount)
{
if (Count + amount > Most)
{
Grow (amount);
}
Grow (amount);
unsigned int place = Count;
Count += amount;
return place;