Move function out of header due to compile errors on macOS

This commit is contained in:
Christoph Oelckers 2018-02-22 13:46:29 +01:00
parent 04344505c0
commit 2c138d703d
2 changed files with 23 additions and 19 deletions

View file

@ -716,3 +716,24 @@ int FExternalLump::FillCache()
return 1;
}
bool FMemoryFile::Open(bool quiet)
{
FString name(ExtractFileBase(Filename));
FString fname(ExtractFileBase(Filename, true));
Lumps = new FUncompressedLump[1]; // must use array allocator
uppercopy(Lumps->Name, name);
Lumps->Name[8] = 0;
Lumps->FullName = fname;
Lumps->Owner = this;
Lumps->Position = 0;
Lumps->LumpSize = Reader->GetLength();
Lumps->Namespace = ns_global;
Lumps->Flags = 0;
Lumps->FullName = NULL;
NumLumps = 1;
return true;
}

View file

@ -160,24 +160,7 @@ struct FMemoryFile : public FUncompressedFile
Reader = &mr;
}
bool Open(bool quiet)
{
FString name(ExtractFileBase(Filename));
FString fname(ExtractFileBase(Filename, true));
Lumps = new FUncompressedLump[1]; // must use array allocator
uppercopy(Lumps->Name, name);
Lumps->Name[8] = 0;
Lumps->FullName = fname;
Lumps->Owner = this;
Lumps->Position = 0;
Lumps->LumpSize = Reader->GetLength();
Lumps->Namespace = ns_global;
Lumps->Flags = 0;
Lumps->FullName = NULL;
NumLumps = 1;
return true;
}
bool Open(bool quiet);
};