- Changed C_ArchiveCVars()'s type parameter to a filter parameter, because using an arbitrary

number to represent a flag combination is stupid unreadable now that there's more than just
  the two possibilities it had when it was first written.

SVN r4278 (trunk)
This commit is contained in:
Randy Heit 2013-05-25 03:23:44 +00:00
commit e271692dbb
3 changed files with 10 additions and 29 deletions

View file

@ -1533,28 +1533,9 @@ void C_SetCVarsToDefaults (void)
}
}
void C_ArchiveCVars (FConfigFile *f, int type)
void C_ArchiveCVars (FConfigFile *f, uint32 filter)
{
// type 0: Game-specific cvars
// type 1: Global cvars
// type 2: Unknown cvars
// type 3: Unknown global cvars
// type 4: User info cvars
// type 5: Server info cvars
static const DWORD filters[6] =
{
CVAR_ARCHIVE,
CVAR_ARCHIVE|CVAR_GLOBALCONFIG,
CVAR_ARCHIVE|CVAR_AUTO,
CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_AUTO,
CVAR_ARCHIVE|CVAR_USERINFO,
CVAR_ARCHIVE|CVAR_SERVERINFO
};
FBaseCVar *cvar = CVars;
DWORD filter;
filter = filters[type];
while (cvar)
{