added a third batch of GetChars call to FStrings.

This commit is contained in:
Christoph Oelckers 2023-10-07 23:03:40 +02:00
commit c94c63110e
31 changed files with 216 additions and 217 deletions

View file

@ -736,7 +736,7 @@ static int FindGLNodesInWAD(int labellump)
glheader.Format("GL_%s", fileSystem.GetFileFullName(labellump));
if (glheader.Len()<=8)
{
int gllabel = fileSystem.CheckNumForName(glheader, FileSys::ns_global, wadfile);
int gllabel = fileSystem.CheckNumForName(glheader.GetChars(), FileSys::ns_global, wadfile);
if (gllabel >= 0) return gllabel;
}
else
@ -754,7 +754,7 @@ static int FindGLNodesInWAD(int labellump)
if (fileSystem.GetFileContainer(lump)==wadfile)
{
auto mem = fileSystem.ReadFile(lump);
if (MatchHeader(fileSystem.GetFileFullName(labellump), GetStringFromLump(lump))) return lump;
if (MatchHeader(fileSystem.GetFileFullName(labellump), GetStringFromLump(lump).GetChars())) return lump;
}
}
}
@ -793,7 +793,7 @@ static int FindGLNodesInFile(FResourceFile * f, const char * label)
{
for(uint32_t i=0;i<numentries-4;i++)
{
if (!strnicmp(f->GetLump(i)->getName(), glheader, 8))
if (!strnicmp(f->GetLump(i)->getName(), glheader.GetChars(), 8))
{
if (mustcheck)
{
@ -1004,7 +1004,7 @@ static FString CreateCacheName(MapData *map, bool create)
FString lumpname = fileSystem.GetFileFullPath(map->lumpnum).c_str();
auto separator = lumpname.IndexOf(':');
path << '/' << lumpname.Left(separator);
if (create) CreatePath(path);
if (create) CreatePath(path.GetChars());
lumpname.ReplaceChars('/', '%');
lumpname.ReplaceChars(':', '$');
@ -1125,7 +1125,7 @@ void MapLoader::CreateCachedNodes(MapData *map)
memcpy(&compressed[offset - 4], "ZGL3", 4);
FString path = CreateCacheName(map, true);
FileWriter *fw = FileWriter::Open(path);
FileWriter *fw = FileWriter::Open(path.GetChars());
if (fw != nullptr)
{
@ -1154,7 +1154,7 @@ bool MapLoader::CheckCachedNodes(MapData *map)
FString path = CreateCacheName(map, false);
FileReader fr;
if (!fr.OpenFile(path)) return false;
if (!fr.OpenFile(path.GetChars())) return false;
if (fr.Read(magic, 4) != 4) return false;
if (memcmp(magic, "CACH", 4)) return false;
@ -1203,7 +1203,7 @@ UNSAFE_CCMD(clearnodecache)
FString path = M_GetCachePath(false);
path += "/";
if (!FileSys::ScanDirectory(list, path, "*", false))
if (!FileSys::ScanDirectory(list, path.GetChars(), "*", false))
{
Printf("Unable to scan node cache directory %s\n", path.GetChars());
return;