]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/GraphicsCacheItem.cpp
ctests: regex to revert two instant_preview tests
[lyx.git] / src / graphics / GraphicsCacheItem.cpp
index 8331718218cf3fe75c635685492e97bd9099a773..4939874ab3b8512f9d6282a5595e17fe0b0628af 100644 (file)
@@ -25,6 +25,7 @@
 #include "support/FileName.h"
 #include "support/filetools.h"
 #include "support/FileMonitor.h"
+#include "support/lassert.h"
 
 #include "support/bind.h"
 
@@ -234,7 +235,7 @@ void CacheItem::Impl::reset()
        file_to_load_.erase();
        to_.erase();
 
-       if (image_.get())
+       if (image_)
                image_.reset();
 
        status_ = WaitingToLoad;
@@ -315,7 +316,7 @@ static string const findTargetFormat(string const & from)
        FormatList const & formats = Cache::get().loadableFormats();
 
         // There must be a format to load from.
-       LASSERT(!formats.empty(), /**/);
+       LASSERT(!formats.empty(), return string());
 
        // Use the standard converter if we don't know the format to load
        // from.
@@ -358,7 +359,7 @@ bool CacheItem::Impl::tryDisplayFormat(FileName & filename, string & from)
                return false;
        }
 
-       zipped_ = filename_.isZippedFile();
+       zipped_ = formats.isZippedFile(filename_);
        if (zipped_) {
                unzipped_filename_ = FileName::tempName(
                        filename_.toFilesystemEncoding());