- fixed some compile errors which were only reported on GCC/Clang.

This commit is contained in:
Christoph Oelckers 2018-03-11 22:05:28 +01:00
parent b445347aca
commit 8c0925dd5d
2 changed files with 15 additions and 10 deletions

View file

@ -323,13 +323,17 @@ FResourceFile *FResourceFile::OpenDirectory(const char *filename, bool quiet)
//
//==========================================================================
FResourceFile::FResourceFile(const char *filename, FileReader &r)
FResourceFile::FResourceFile(const char *filename)
{
if (filename != NULL) Filename = copystring(filename);
else Filename = NULL;
Reader = std::move(r);
}
FResourceFile::FResourceFile(const char *filename, FileReader &r)
: FResourceFile(filename)
{
Reader = std::move(r);
}
FResourceFile::~FResourceFile()
{
@ -642,11 +646,13 @@ int FUncompressedLump::FillCache()
//
//==========================================================================
FUncompressedFile::FUncompressedFile(const char *filename)
: FResourceFile(filename)
{}
FUncompressedFile::FUncompressedFile(const char *filename, FileReader &r)
: FResourceFile(filename, r)
{
Lumps = NULL;
}
: FResourceFile(filename, r)
{}
FUncompressedFile::~FUncompressedFile()
{

View file

@ -86,6 +86,7 @@ public:
protected:
uint32_t NumLumps;
FResourceFile(const char *filename);
FResourceFile(const char *filename, FileReader &r);
// for archives that can contain directories
@ -131,14 +132,12 @@ struct FUncompressedLump : public FResourceLump
class FUncompressedFile : public FResourceFile
{
protected:
FUncompressedLump * Lumps;
FUncompressedLump * Lumps = nullptr;
FUncompressedFile(const char *filename);
FUncompressedFile(const char *filename, FileReader &r);
virtual ~FUncompressedFile();
virtual FResourceLump *GetLump(int no) { return ((unsigned)no < NumLumps)? &Lumps[no] : NULL; }
public:
};