[Scummvm-git-logs] scummvm master -> da4d4d8272a96b6ce5de905966f1ce9ba859a6a3

dreammaster dreammaster at scummvm.org
Tue Aug 8 01:09:37 CEST 2017


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
9a0f1adcb7 COMMON: Add a setVersion method to Common::Serializer
da4d4d8272 SHERLOCK: Remove redundant derived Serializer class


Commit: 9a0f1adcb7e6682aea7edc56751998db54b25e8a
    https://github.com/scummvm/scummvm/commit/9a0f1adcb7e6682aea7edc56751998db54b25e8a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-08-07T19:07:25-04:00

Commit Message:
COMMON: Add a setVersion method to Common::Serializer

Changed paths:
    common/serializer.h


diff --git a/common/serializer.h b/common/serializer.h
index ef8fca9..2def17c 100644
--- a/common/serializer.h
+++ b/common/serializer.h
@@ -144,6 +144,10 @@ public:
 	 */
 	Version getVersion() const { return _version; }
 
+	/**
+	 * Manually set the version
+	 */
+	void setVersion(Version version) { _version = version; }
 
 	/**
 	 * Return the total number of bytes synced so far.


Commit: da4d4d8272a96b6ce5de905966f1ce9ba859a6a3
    https://github.com/scummvm/scummvm/commit/da4d4d8272a96b6ce5de905966f1ce9ba859a6a3
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-08-07T19:08:03-04:00

Commit Message:
SHERLOCK: Remove redundant derived Serializer class

Changed paths:
    engines/sherlock/saveload.cpp
    engines/sherlock/saveload.h


diff --git a/engines/sherlock/saveload.cpp b/engines/sherlock/saveload.cpp
index 45a4eed..44b5e10 100644
--- a/engines/sherlock/saveload.cpp
+++ b/engines/sherlock/saveload.cpp
@@ -219,7 +219,7 @@ void SaveManager::loadGame(int slot) {
 
 	// Synchronize the savegame data
 	Serializer s(saveFile, nullptr);
-	s.setSaveVersion(header._version);
+	s.setVersion(header._version);
 	synchronize(s);
 
 	delete saveFile;
@@ -237,7 +237,7 @@ void SaveManager::saveGame(int slot, const Common::String &name) {
 
 	// Synchronize the savegame data
 	Serializer s(nullptr, out);
-	s.setSaveVersion(CURRENT_SAVEGAME_VERSION);
+	s.setVersion(CURRENT_SAVEGAME_VERSION);
 	synchronize(s);
 
 	out->finalize();
diff --git a/engines/sherlock/saveload.h b/engines/sherlock/saveload.h
index 9a26741..59b0b26 100644
--- a/engines/sherlock/saveload.h
+++ b/engines/sherlock/saveload.h
@@ -55,19 +55,7 @@ struct SherlockSavegameHeader {
 
 class SherlockEngine;
 
-
-/**
- * Derived serializer class with extra synchronization types
- */
-class Serializer : public Common::Serializer {
-public:
-	Serializer(Common::SeekableReadStream *in, Common::WriteStream *out) : Common::Serializer(in, out) {}
-
-	/**
-	 * New method to allow setting the version
-	 */
-	void setSaveVersion(byte version) { _version = version; }
-};
+typedef Common::Serializer Serializer;
 
 class SaveManager {
 protected:





More information about the Scummvm-git-logs mailing list