COMMON: Make MemoryReadStreamEndian inherit from SeekableReadStreamEndian

This commit is contained in:
Eugene Sandulenko 2020-07-21 12:46:22 +02:00
parent 9dfaabb47c
commit 8939609787

View File

@ -78,10 +78,17 @@ public:
* This is a MemoryReadStream subclass which adds non-endian
* read methods whose endianness is set on the stream creation.
*/
class MemoryReadStreamEndian : public MemoryReadStream, public ReadStreamEndian {
class MemoryReadStreamEndian : public MemoryReadStream, public SeekableReadStreamEndian {
public:
MemoryReadStreamEndian(const byte *buf, uint32 len, bool bigEndian)
: MemoryReadStream(buf, len), ReadStreamEndian(bigEndian) {}
: MemoryReadStream(buf, len), SeekableReadStreamEndian(bigEndian) {}
int32 pos() const { return MemoryReadStream::pos(); }
int32 size() const { return MemoryReadStream::size(); }
bool seek(int32 offs, int whence = SEEK_SET) { return MemoryReadStream::seek(offs, whence); }
bool skip(uint32 offset) { return MemoryReadStream::seek(offset, SEEK_CUR); }
};
/**