- fixed some remaining issues:

* initial positioning in a subsection of a file failed. This mainly affected music playback.
* made the FileRdr constructor which takes a FileReaderInterface private so that everything that needs it must be explicitly declared as friend.
* removed a few redundant construction initializers for FileRdrs.
* loading compressed nodes needs to check the validity of its reader.
* use GetLength to detemine the size of a Zip file instead of doing another seek to the end.
* removed duplicate Length variables.
This commit is contained in:
Christoph Oelckers 2018-03-11 13:26:30 +01:00
commit 8bbfd39f42
7 changed files with 42 additions and 39 deletions

View file

@ -42,26 +42,21 @@
#include "m_misc.h"
class DecompressorBase : public FileReaderInterface
long DecompressorBase::Tell () const
{
public:
// These do not work but need to be defined to satisfy the FileReader interface
long Tell () const override
{
I_Error("Cannot get position of decompressor stream");
return 0;
}
virtual long Seek (long offset, int origin) override
{
I_Error("Cannot seek in decompressor stream");
return 0;
}
virtual char *Gets(char *strbuf, int len) override
{
I_Error("Cannot use Gets on decompressor stream");
return nullptr;
}
};
I_Error("Cannot get position of decompressor stream");
return 0;
}
long DecompressorBase::Seek (long offset, int origin)
{
I_Error("Cannot seek in decompressor stream");
return 0;
}
char *DecompressorBase::Gets(char *strbuf, int len)
{
I_Error("Cannot use Gets on decompressor stream");
return nullptr;
}
//==========================================================================
//