- got rid of FNameNoInit and made the default constructor of FName non-initializing.

This setup has been a constant source of problems so now I reviewed all uses of FName to make sure that everything that needs to be initialized is done manually.
This also merges the player_t constructor into the class definition as default values.
This commit is contained in:
Christoph Oelckers 2018-08-19 01:14:15 +02:00
commit fad406c4c9
47 changed files with 185 additions and 309 deletions

View file

@ -756,7 +756,7 @@ void D_ReadUserInfoStrings (int pnum, uint8_t **stream, bool update)
const char *breakpt;
FString value;
bool compact;
FName keyname;
FName keyname = NAME_None;
unsigned int infotype = 0;
if (*ptr++ != '\\')
@ -925,8 +925,6 @@ void WriteUserInfo(FSerializer &arc, userinfo_t &info)
void ReadUserInfo(FSerializer &arc, userinfo_t &info, FString &skin)
{
FName name;
FBaseCVar **cvar;
UCVarValue val;
const char *key;
const char *str;
@ -938,8 +936,8 @@ void ReadUserInfo(FSerializer &arc, userinfo_t &info, FString &skin)
while ((key = arc.GetKey()))
{
arc.StringPtr(nullptr, str);
name = key;
cvar = info.CheckKey(name);
FName name = key;
FBaseCVar **cvar = info.CheckKey(name);
if (cvar != NULL && *cvar != NULL)
{
switch (name)