add GetChars() accessors to many FString uses where const char* is wanted.

By no means complete, it's just a start to get rid of that automatic type conversion operator.
This commit is contained in:
Christoph Oelckers 2023-10-03 14:27:13 +02:00
commit 1717ff47b2
28 changed files with 92 additions and 97 deletions

View file

@ -142,7 +142,7 @@ void FCajunMaster::Main(FLevelLocals *Level)
{
if (t_join == ((wanted_botnum - botnum) * SPAWN_DELAY))
{
if (!SpawnBot (getspawned[spawn_tries]))
if (!SpawnBot (getspawned[spawn_tries].GetChars()))
wanted_botnum--;
spawn_tries++;
}
@ -309,7 +309,7 @@ bool FCajunMaster::SpawnBot (const char *name, int color)
{ // Keep the bot on the same team when switching levels
concat.AppendFormat("\\team\\%d\n", thebot->lastteam);
}
Net_WriteString (concat);
Net_WriteString (concat.GetChars());
}
Net_WriteByte(thebot->skill.aiming);
Net_WriteByte(thebot->skill.perfection);
@ -525,7 +525,7 @@ bool FCajunMaster::LoadBots ()
DPrintf (DMSG_ERROR, "No " BOTFILENAME ", so no bots\n");
return false;
}
if (!sc.OpenFile(tmp))
if (!sc.OpenFile(tmp.GetChars()))
{
Printf("Unable to open %s. So no bots\n", tmp.GetChars());
return false;