projects
/
goodguy
/
cinelerra.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
minor improvements from Andrew
[goodguy/cinelerra.git]
/
cinelerra-5.1
/
cinelerra
/
cachebase.C
diff --git
a/cinelerra-5.1/cinelerra/cachebase.C
b/cinelerra-5.1/cinelerra/cachebase.C
index 40b1e1bf8d08b22dadac577f04ba56b8203891dc..690129603258dbaf37bfa5495cd89d42089251fe 100644
(file)
--- a/
cinelerra-5.1/cinelerra/cachebase.C
+++ b/
cinelerra-5.1/cinelerra/cachebase.C
@@
-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;
{
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();
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)
{
void CacheBase::del_item(CacheItemBase *item)
{