1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-19 01:04:20 +00:00

Added method AudioThumbnailCache::removeThumb().

This commit is contained in:
jules 2013-02-27 17:54:45 +00:00
parent 6c08b41a5a
commit 42ade06d78
2 changed files with 12 additions and 0 deletions

View file

@ -140,6 +140,15 @@ void AudioThumbnailCache::clear()
thumbs.clear();
}
void AudioThumbnailCache::removeThumb (const int64 hashCode)
{
const ScopedLock sl (lock);
for (int i = thumbs.size(); --i >= 0;)
if (thumbs.getUnchecked(i)->hash == hashCode)
thumbs.remove (i);
}
static inline int getThumbnailCacheFileMagicHeader() noexcept
{
return (int) ByteOrder::littleEndianInt ("ThmC");