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/saga/detection.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'engines/saga') diff --git a/engines/saga/detection.cpp b/engines/saga/detection.cpp index 2f1b61eed8..091ec8d427 100644 --- a/engines/saga/detection.cpp +++ b/engines/saga/detection.cpp @@ -256,13 +256,7 @@ SaveStateDescriptor SagaMetaEngine::querySaveMetaInfos(const char *target, int s desc.setWriteProtectedFlag(false); if (version >= 6) { - Graphics::Surface *thumbnail = new Graphics::Surface(); - assert(thumbnail); - if (!Graphics::loadThumbnail(*in, *thumbnail)) { - delete thumbnail; - thumbnail = 0; - } - + Graphics::Surface *const thumbnail = Graphics::loadThumbnail(*in); desc.setThumbnail(thumbnail); uint32 saveDate = in->readUint32BE(); -- cgit v1.2.3