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

@ -165,10 +165,7 @@ bool FStringTable::readMacros(int lumpnum)
for (unsigned i = 1; i < data.Size(); i++)
{
auto macroname = data[i][0];
auto language = data[i][1];
if (macroname.IsEmpty() || language.IsEmpty()) continue;
FStringf combined_name("%s/%s", language.GetChars(), macroname.GetChars());
FName name = combined_name.GetChars();
FName name = macroname.GetChars();
StringMacro macro;
@ -446,9 +443,8 @@ void FStringTable::InsertString(int lumpnum, int langid, FName label, const FStr
break;
}
FString macroname(te.strings[0].GetChars() + index + 2, endindex - index - 2);
FStringf lookupstr("%s/%s", strlangid, macroname.GetChars());
FStringf replacee("@[%s]", macroname.GetChars());
FName lookupname(lookupstr.GetChars(), true);
FName lookupname(macroname.GetChars(), true);
auto replace = allMacros.CheckKey(lookupname);
for (int i = 0; i < 4; i++)
{