From dadd09ff4973a9d0394f5ebfa96195f78cb74b55 Mon Sep 17 00:00:00 2001 From: Karl Blomster Date: Sun, 29 Nov 2009 19:12:40 +0000 Subject: [PATCH] Remove SetCacheMax() function as it is no longer used. Originally committed to SVN as r3833. --- aegisub/src/video_provider_cache.cpp | 16 ++++------------ aegisub/src/video_provider_cache.h | 1 - 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/aegisub/src/video_provider_cache.cpp b/aegisub/src/video_provider_cache.cpp index 6c018af43..6778ed597 100644 --- a/aegisub/src/video_provider_cache.cpp +++ b/aegisub/src/video_provider_cache.cpp @@ -49,7 +49,10 @@ VideoProviderCache::VideoProviderCache(VideoProvider *parent) { master = parent; cacheMax = 0; - parent->WantsCaching() ? SetCacheMax(1) : SetCacheMax(0); + if (parent->WantsCaching()) + cacheMax = Options.AsInt(_T("Video cache size")) << 20; // convert MB to bytes + else + cacheMax = 0; } @@ -89,17 +92,6 @@ const AegiVideoFrame VideoProviderCache::GetFrame(int n) { return *srcFrame; } -/// @brief Set maximum cache size -/// @param n -/// -void VideoProviderCache::SetCacheMax(int n) { - if (n <= 0) - cacheMax = 0; - else - cacheMax = Options.AsInt(_T("Video cache size")) << 20; // convert MB to bytes -} - - /// @brief Add to cache /// @param n diff --git a/aegisub/src/video_provider_cache.h b/aegisub/src/video_provider_cache.h index 222f86889..c73faf307 100644 --- a/aegisub/src/video_provider_cache.h +++ b/aegisub/src/video_provider_cache.h @@ -88,7 +88,6 @@ private: protected: // Cache functions - void SetCacheMax(int n_frames); unsigned GetCurCacheSize(); void ClearCache();