-// -*- C++ -*-
/* This file is part of
* =================================================
*
* LyX, The Document Processor
* Copyright 1995 Matthias Ettrich.
- * Copyright 1995-2000 The LyX Team.
+ * Copyright 1995-2001 The LyX Team.
*
* This file Copyright 2000 Baruch Even
* ================================================= */
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.
}
CacheType::iterator it = cache.find(filename);
if (it != cache.end()) {
- return (*it).second;
+ return it->second;
}
shared_ptr_item cacheItem(new GraphicsCacheItem(filename));