GRAPHICS: Simplify the interface of Graphics::loadThumbnail().

Now it returns the Surface, so the caller does not need to create one and pass it.
This commit is contained in:
Christoph Mallon 2011-08-07 14:35:01 +02:00
parent b4b6ce0954
commit e35b4f20c1
14 changed files with 26 additions and 79 deletions

View file

@ -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();