From e35b4f20c1041b13361aa2ebc4e758873bb1cee3 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Sun, 7 Aug 2011 14:35:01 +0200 Subject: GRAPHICS: Simplify the interface of Graphics::loadThumbnail(). Now it returns the Surface, so the caller does not need to create one and pass it. --- engines/draci/saveload.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'engines/draci/saveload.cpp') diff --git a/engines/draci/saveload.cpp b/engines/draci/saveload.cpp index 1479dd3c77..78315d1a97 100644 --- a/engines/draci/saveload.cpp +++ b/engines/draci/saveload.cpp @@ -58,13 +58,9 @@ bool readSavegameHeader(Common::InSaveFile *in, DraciSavegameHeader &header) { header.playtime = in->readUint32LE(); // Get the thumbnail - header.thumbnail = new Graphics::Surface(); - if (!Graphics::loadThumbnail(*in, *header.thumbnail)) { - header.thumbnail->free(); - delete header.thumbnail; - header.thumbnail = NULL; + header.thumbnail = Graphics::loadThumbnail(*in); + if (!header.thumbnail) return false; - } return true; } -- cgit v1.2.3