diff options
| author | Christoph Mallon | 2011-08-07 14:35:01 +0200 |
|---|---|---|
| committer | Christoph Mallon | 2011-08-07 15:19:09 +0200 |
| commit | e35b4f20c1041b13361aa2ebc4e758873bb1cee3 (patch) | |
| tree | b07e8cc3f161fb91f7220d94f24f264cfd13b788 /engines/sword1 | |
| parent | b4b6ce0954f4a636be0b7b88197376b3917af31f (diff) | |
| download | scummvm-rg350-e35b4f20c1041b13361aa2ebc4e758873bb1cee3.tar.gz scummvm-rg350-e35b4f20c1041b13361aa2ebc4e758873bb1cee3.tar.bz2 scummvm-rg350-e35b4f20c1041b13361aa2ebc4e758873bb1cee3.zip | |
GRAPHICS: Simplify the interface of Graphics::loadThumbnail().
Now it returns the Surface, so the caller does not need to create one and pass it.
Diffstat (limited to 'engines/sword1')
| -rw-r--r-- | engines/sword1/detection.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/engines/sword1/detection.cpp b/engines/sword1/detection.cpp index 0c1e74082f..4da636bce9 100644 --- a/engines/sword1/detection.cpp +++ b/engines/sword1/detection.cpp @@ -274,13 +274,7 @@ SaveStateDescriptor SwordMetaEngine::querySaveMetaInfos(const char *target, int in->skip(1); if (Graphics::checkThumbnailHeader(*in)) { - 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); } |
