Skip to content
This repository was archived by the owner on Dec 27, 2020. It is now read-only.

Commit 110ac1b

Browse files
committed
TOOLS: Add destructor to SeekableReadStream.
1 parent cd3d838 commit 110ac1b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/emi/filetools.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ Vector4d *readVector4d(std::istream &file) {
147147
//TODO: Endianness
148148
class SeekableReadStream {
149149
public:
150+
virtual ~SeekableReadStream() {}
150151
virtual uint32 readUint32() = 0;
151152
virtual void read(void *target, uint32 length) = 0;
152153
virtual void seek(int offset, int whence = SEEK_SET) = 0;
@@ -158,7 +159,7 @@ class MemoryReadStream : public SeekableReadStream {
158159
uint32 _length;
159160
public:
160161
MemoryReadStream(byte *data, uint32 length) : _data(data), _length(length), _pos(0) {}
161-
~MemoryReadStream() {
162+
virtual ~MemoryReadStream() {
162163
delete[] _data;
163164
}
164165

0 commit comments

Comments
 (0)