diff options
author | Alexander Tkachev | 2016-08-24 16:24:16 +0600 |
---|---|---|
committer | Alexander Tkachev | 2016-08-24 16:24:16 +0600 |
commit | 368f664c813075f8b8cb2c572dce65f60128eda4 (patch) | |
tree | d225ceadc86497eca274d53cb22bbc6601cbfa80 /common | |
parent | ea360ef8f20655c0eedbf52a46096f231c459214 (diff) | |
download | scummvm-rg350-368f664c813075f8b8cb2c572dce65f60128eda4.tar.gz scummvm-rg350-368f664c813075f8b8cb2c572dce65f60128eda4.tar.bz2 scummvm-rg350-368f664c813075f8b8cb2c572dce65f60128eda4.zip |
COMMON: Fix WriteStream::pos() once again
MemoryReadWriteStream now returns int32, not uint32. It actually doesn't
ever return -1 to indicate that an error occured, so uint32 was a better
choice, but that's what is used in WriteStream base class now.
That method is abstract, so that's also why OutSaveFile had to override
it.
Diffstat (limited to 'common')
-rw-r--r-- | common/memstream.h | 2 | ||||
-rw-r--r-- | common/savefile.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/common/memstream.h b/common/memstream.h index 94b8d1992d..25fdde91c7 100644 --- a/common/memstream.h +++ b/common/memstream.h @@ -286,7 +286,7 @@ public: return dataSize; } - uint32 pos() const { return _pos - _length; } //'read' position in the stream + int32 pos() const { return _pos - _length; } //'read' position in the stream uint32 size() const { return _size; } //that's also 'write' position in the stream, as it's append-only byte *getData() { return _data; } diff --git a/common/savefile.h b/common/savefile.h index d84c9e275a..eb7e6f946e 100644 --- a/common/savefile.h +++ b/common/savefile.h @@ -58,6 +58,7 @@ public: virtual void finalize(); virtual bool flush(); virtual uint32 write(const void *dataPtr, uint32 dataSize); + virtual int32 pos() const; }; /** |