mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-30 23:43:10 +00:00
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.
This commit is contained in:
parent
ea360ef8f2
commit
368f664c81
@ -50,6 +50,10 @@ uint32 OutSaveFile::write(const void *dataPtr, uint32 dataSize) {
|
||||
return _wrapped->write(dataPtr, dataSize);
|
||||
}
|
||||
|
||||
int32 OutSaveFile::pos() const {
|
||||
return _wrapped->pos();
|
||||
}
|
||||
|
||||
bool SaveFileManager::copySavefile(const String &oldFilename, const String &newFilename) {
|
||||
InSaveFile *inFile = 0;
|
||||
OutSaveFile *outFile = 0;
|
||||
|
@ -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; }
|
||||
|
@ -58,6 +58,7 @@ public:
|
||||
virtual void finalize();
|
||||
virtual bool flush();
|
||||
virtual uint32 write(const void *dataPtr, uint32 dataSize);
|
||||
virtual int32 pos() const;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user