[Scummvm-cvs-logs] SF.net SVN: scummvm:[34701] scummvm/trunk/gui/theme.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Tue Sep 30 14:37:31 CEST 2008
Revision: 34701
http://scummvm.svn.sourceforge.net/scummvm/?rev=34701&view=rev
Author: fingolfin
Date: 2008-09-30 12:37:28 +0000 (Tue, 30 Sep 2008)
Log Message:
-----------
cleanup
Modified Paths:
--------------
scummvm/trunk/gui/theme.cpp
Modified: scummvm/trunk/gui/theme.cpp
===================================================================
--- scummvm/trunk/gui/theme.cpp 2008-09-30 12:27:38 UTC (rev 34700)
+++ scummvm/trunk/gui/theme.cpp 2008-09-30 12:37:28 UTC (rev 34701)
@@ -71,9 +71,10 @@
#ifdef USE_ZLIB
Common::ZipArchive zipArchive(_stylefile + ".zip");
- if (zipArchive.hasFile(cacheFilename)) {
- Common::FilePtr stream(zipArchive.openFile(cacheFilename));
- font = Graphics::NewFont::loadFromCache(*stream.get());
+ Common::SeekableReadStream *stream(zipArchive.openFile(cacheFilename));
+ if (stream) {
+ font = Graphics::NewFont::loadFromCache(*stream);
+ delete stream;
}
#endif
if (font)
@@ -88,9 +89,10 @@
#ifdef USE_ZLIB
if (!font) {
Common::ZipArchive zipArchive(_stylefile + ".zip");
- if (zipArchive.hasFile(filename)) {
- Common::FilePtr stream(zipArchive.openFile(filename));
- font = Graphics::NewFont::loadFont(*stream.get());
+ Common::SeekableReadStream *stream(zipArchive.openFile(filename));
+ if (stream) {
+ font = Graphics::NewFont::loadFont(*stream);
+ delete stream;
}
}
#endif
@@ -139,10 +141,9 @@
#ifdef USE_ZLIB
// Maybe find a nicer solution to this
Common::ZipArchive zipArchive(stylefile + ".zip");
- if (zipArchive.hasFile(stylefile + ".ini")) {
- Common::FilePtr stream(zipArchive.openFile(stylefile + ".ini"));
- if (_configFile.loadFromStream(*stream.get()))
- return true;
+ Common::File file;
+ if (file.open(stylefile + ".ini", zipArchive)) {
+ return _configFile.loadFromStream(file);
}
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list