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

@ -408,9 +408,9 @@ void FWeaponSlots::LocalSetup(PClassActor *type)
{
FString sectionclass(WeaponSection);
sectionclass << '.' << type->TypeName.GetChars();
if (RestoreSlots(GameConfig, sectionclass) == 0)
if (RestoreSlots(GameConfig, sectionclass.GetChars()) == 0)
{
RestoreSlots(GameConfig, WeaponSection);
RestoreSlots(GameConfig, WeaponSection.GetChars());
}
}
else
@ -504,7 +504,7 @@ int FWeaponSlots::RestoreSlots(FConfigFile *config, const char *section)
int slotsread = 0;
section_name += ".Weapons";
if (!config->SetSection(section_name))
if (!config->SetSection(section_name.GetChars()))
{
return 0;
}
@ -742,7 +742,7 @@ void P_PlaybackKeyConfWeapons(FWeaponSlots *slots)
PlayingKeyConf = slots;
for (unsigned int i = 0; i < KeyConfWeapons.Size(); ++i)
{
AddCommandString(KeyConfWeapons[i]);
AddCommandString(KeyConfWeapons[i].GetChars());
}
PlayingKeyConf = nullptr;
}