add stacked edl editing, add sketcher/vframe line anti-aliasing
[goodguy/cinelerra.git] / cinelerra-5.1 / cinelerra / cachebase.C
index 40b1e1bf8d08b22dadac577f04ba56b8203891dc..690129603258dbaf37bfa5495cd89d42089251fe 100644 (file)
@@ -88,20 +88,26 @@ void CacheBase::remove_all()
 }
 
 
-void CacheBase::remove_asset(Asset *asset)
+void CacheBase::remove_item(int source_id, char *path)
 {
        CacheItemBase *current, *next;
        lock->lock("CacheBase::remove_id");
        for( current=first; current; current=next ) {
                next = current->next;
-               if( (current->path && !strcmp(current->path, asset->path)) ||
-                       current->source_id == asset->id)
+               if( current->source_id == source_id ||
+                   (path && current->path && !strcmp(current->path, path)) )
                        del_item(current);
        }
        lock->unlock();
-//printf("CacheBase::remove_asset: removed %d entries for %s\n", total, asset->path);
 }
-
+void CacheBase::remove_item(Indexable *idxbl)
+{
+       remove_item(idxbl->id, idxbl->path);
+}
+void CacheBase::remove_asset(Asset *asset)
+{
+       remove_item(asset);
+}
 
 void CacheBase::del_item(CacheItemBase *item)
 {