From fcf3ea61fef643231076ce9b3d6e160f74015477 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 4 Aug 2010 08:26:09 +0000 Subject: SCI: Simplify code (let the compiler interfer types where possible) svn-id: r51727 --- engines/sci/engine/savegame.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'engines') diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 96dddb2c62..4a60aaa2fb 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -173,7 +173,7 @@ void SegManager::saveLoadWithSerializer(Common::Serializer &s) { template <> void syncWithSerializer(Common::Serializer &s, Class &obj) { s.syncAsSint32LE(obj.script); - syncWithSerializer(s, obj.reg); + syncWithSerializer(s, obj.reg); } static void sync_SavegameMetadata(Common::Serializer &s, SavegameMetadata &obj) { @@ -233,7 +233,7 @@ void LocalVariables::saveLoadWithSerializer(Common::Serializer &s) { void Object::saveLoadWithSerializer(Common::Serializer &s) { s.syncAsSint32LE(_flags); - syncWithSerializer(s, _pos); + syncWithSerializer(s, _pos); s.syncAsSint32LE(_methodCount); // that's actually a uint16 syncArray(s, _variables); @@ -243,25 +243,25 @@ template <> void syncWithSerializer(Common::Serializer &s, Table::Entry &obj) { s.syncAsSint32LE(obj.next_free); - syncWithSerializer(s, obj); + syncWithSerializer(s, obj); } template <> void syncWithSerializer(Common::Serializer &s, Table::Entry &obj) { s.syncAsSint32LE(obj.next_free); - syncWithSerializer(s, obj.first); - syncWithSerializer(s, obj.last); + syncWithSerializer(s, obj.first); + syncWithSerializer(s, obj.last); } template <> void syncWithSerializer(Common::Serializer &s, Table::Entry &obj) { s.syncAsSint32LE(obj.next_free); - syncWithSerializer(s, obj.pred); - syncWithSerializer(s, obj.succ); - syncWithSerializer(s, obj.key); - syncWithSerializer(s, obj.value); + syncWithSerializer(s, obj.pred); + syncWithSerializer(s, obj.succ); + syncWithSerializer(s, obj.key); + syncWithSerializer(s, obj.value); } #ifdef ENABLE_SCI32 @@ -295,7 +295,7 @@ void syncWithSerializer(Common::Serializer &s, Table >::Entry &o if (s.isSaving()) value = obj.getValue(i); - syncWithSerializer(s, value); + syncWithSerializer(s, value); if (s.isLoading()) obj.setValue(i, value); @@ -381,14 +381,14 @@ void Script::saveLoadWithSerializer(Common::Serializer &s) { _objects.clear(); Object tmp; for (uint i = 0; i < numObjs; ++i) { - syncWithSerializer(s, tmp); + syncWithSerializer(s, tmp); _objects[tmp.getPos().offset] = tmp; } } else { ObjMap::iterator it; const ObjMap::iterator end = _objects.end(); for (it = _objects.begin(); it != end; ++it) { - syncWithSerializer(s, it->_value); + syncWithSerializer(s, it->_value); } } @@ -494,7 +494,7 @@ void SciMusic::saveLoadWithSerializer(Common::Serializer &s) { } void MusicEntry::saveLoadWithSerializer(Common::Serializer &s) { - syncWithSerializer(s, soundObj); + syncWithSerializer(s, soundObj); s.syncAsSint16LE(resourceId); s.syncAsSint16LE(dataInc); s.syncAsSint16LE(ticker); -- cgit v1.2.3