From 09501be85bee9f686a7815fc0f47a1e16008f38d Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 2 Jul 2011 20:25:32 +0200 Subject: ENGINES: Clean up SaveStateDescriptor. Now SaveStateDescriptor no longer subclasses HashMap. Instead all possible saved meta data is included directly into SaveStateDescriptor. This is slightly less flexible, but we never needed that flexibility so far. On the other hand it should reduce the memory usage. At least on my system (Linux/amd64) the old SaveStateDescriptor had a size of 928 and the new SaveStateDescriptor has a size of 200. --- engines/groovie/saveload.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/groovie/saveload.cpp') diff --git a/engines/groovie/saveload.cpp b/engines/groovie/saveload.cpp index a0463db0be..14e7a09cb2 100644 --- a/engines/groovie/saveload.cpp +++ b/engines/groovie/saveload.cpp @@ -102,7 +102,7 @@ Common::InSaveFile *SaveLoad::openForLoading(const Common::String &target, int s // Fill the SaveStateDescriptor if it was provided if (descriptor) { // Initialize the SaveStateDescriptor - descriptor->setVal("save_slot", Common::String('0' + slot)); + descriptor->setSaveSlot(slot); descriptor->setDeletableFlag(true); descriptor->setWriteProtectedFlag(false); @@ -132,7 +132,7 @@ Common::InSaveFile *SaveLoad::openForLoading(const Common::String &target, int s description += c; } } - descriptor->setVal("description", description); + descriptor->setDescription(description); } // Return a substream, skipping the metadata -- cgit v1.2.3