diff options
author | Marcus Comstedt | 2005-05-04 23:38:07 +0000 |
---|---|---|
committer | Marcus Comstedt | 2005-05-04 23:38:07 +0000 |
commit | 38c9a40c22c9017b4e43b1c5670ba569da94dee8 (patch) | |
tree | e4b50500ef367f5fc6be3f25447d6c80ee94390c /backends | |
parent | fc25ef24b013192353ff0660d83c918da161cf5c (diff) | |
download | scummvm-rg350-38c9a40c22c9017b4e43b1c5670ba569da94dee8.tar.gz scummvm-rg350-38c9a40c22c9017b4e43b1c5670ba569da94dee8.tar.bz2 scummvm-rg350-38c9a40c22c9017b4e43b1c5670ba569da94dee8.zip |
Dispense with the filename field of InVMSaves.
svn-id: r17911
Diffstat (limited to 'backends')
-rw-r--r-- | backends/dc/vmsave.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/backends/dc/vmsave.cpp b/backends/dc/vmsave.cpp index 49eae48a9b..cf6ead1100 100644 --- a/backends/dc/vmsave.cpp +++ b/backends/dc/vmsave.cpp @@ -220,16 +220,13 @@ class InVMSave : public InSaveFile { private: char *buffer; int pos, size; - char filename[16]; uint32 read(void *buf, uint32 cnt); public: - InVMSave(const char *_filename) + InVMSave() : pos(0), buffer(NULL) - { - strncpy(filename, _filename, 16); - } + { } ~InVMSave() { @@ -239,7 +236,7 @@ public: bool eos() const { return pos >= size; } - bool readSaveGame() + bool readSaveGame(const char *filename) { return ::readSaveGame(buffer, size, filename); } void tryUncompress() @@ -284,8 +281,8 @@ public: } virtual InSaveFile *openForLoading(const char *filename) { - InVMSave *s = new InVMSave(filename); - if(s->readSaveGame()) { + InVMSave *s = new InVMSave(); + if(s->readSaveGame(filename)) { s->tryUncompress(); return s; } else { |