- The FlagLists structure cannot be anonymous if I want to use countof with it with GCC.

- Added a stopping check to A_ChangeVelocity.

SVN r1699 (trunk)
This commit is contained in:
Randy Heit 2009-07-01 01:10:29 +00:00
commit 9bf7c02194
2 changed files with 24 additions and 10 deletions

View file

@ -297,7 +297,7 @@ static FFlagDef PlayerPawnFlags[] =
DEFINE_FLAG(PPF, NOTHRUSTWHENINVUL, APlayerPawn, PlayerFlags),
};
static const struct { const PClass *Type; FFlagDef *Defs; int NumDefs; } FlagLists[] =
static const struct FFlagList { const PClass *Type; FFlagDef *Defs; int NumDefs; } FlagLists[] =
{
{ RUNTIME_CLASS(AActor), ActorFlags, countof(ActorFlags) },
{ RUNTIME_CLASS(AInventory), InventoryFlags, countof(InventoryFlags) },
@ -344,7 +344,7 @@ static FFlagDef *FindFlag (FFlagDef *flags, int numflags, const char *flag)
FFlagDef *FindFlag (const PClass *type, const char *part1, const char *part2)
{
FFlagDef *def;
int i;
size_t i;
if (part2 == NULL)
{ // Search all lists
@ -534,7 +534,7 @@ static int STACK_ARGS varcmp(const void * a, const void * b)
void InitThingdef()
{
// Sort the flag lists
for (int i = 0; i < NUM_FLAG_LISTS; ++i)
for (size_t i = 0; i < NUM_FLAG_LISTS; ++i)
{
qsort (FlagLists[i].Defs, FlagLists[i].NumDefs, sizeof(FFlagDef), flagcmp);
}