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/toon/detection.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'engines/toon') diff --git a/engines/toon/detection.cpp b/engines/toon/detection.cpp index 810a37720a..ac4caae8b2 100644 --- a/engines/toon/detection.cpp +++ b/engines/toon/detection.cpp @@ -224,12 +224,7 @@ SaveStateDescriptor ToonMetaEngine::querySaveMetaInfos(const char *target, int s SaveStateDescriptor desc(slot, saveName); - Graphics::Surface *thumbnail = new Graphics::Surface(); - assert(thumbnail); - if (!Graphics::loadThumbnail(*file, *thumbnail)) { - delete thumbnail; - thumbnail = 0; - } + Graphics::Surface *const thumbnail = Graphics::loadThumbnail(*file); desc.setThumbnail(thumbnail); desc.setDeletableFlag(true); -- cgit v1.2.3