]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/GraphicsCache.C
use anon namespace, somewhat better comp. handling of minipages, not quite there yet
[lyx.git] / src / graphics / GraphicsCache.C
index cda36db9fc6b13059ce32149e82567222408a171..93c3f9a822d3db868a1a0081bf0e48f82eb33c05 100644 (file)
@@ -30,8 +30,7 @@ GraphicsCache::getInstance()
 
 GraphicsCache::~GraphicsCache()
 {
-       // The map elements should have already been eliminated.
-       Assert(cache.empty());
+       // All elements are destroyed by the shared_ptr's in the map.
 }
 
 
@@ -41,7 +40,7 @@ GraphicsCache::addFile(string const & filename)
        CacheType::iterator it = cache.find(filename);
        
        if (it != cache.end()) {
-               return (*it).second;
+               return it->second;
        }
        
        shared_ptr_item cacheItem(new GraphicsCacheItem(filename));