summaryrefslogtreecommitdiff
path: root/view/sharedcache/core/SharedCacheView.cpp
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-04-14 01:53:06 -0400
committerMason Reed <mason@vector35.com>2025-04-14 03:20:51 -0400
commitb74c500aa9e5e7949ca46f42e0dc62e02136e259 (patch)
treeae35d1385b653b3b76d1fed032a55412c718a23a /view/sharedcache/core/SharedCacheView.cpp
parent043a863cef0cecd85d81704a2cfa89bc8964d5c0 (diff)
[SharedCache] Misc cleanup
- Make `SharedCache::m_entries` a simple std::vector we never lookup based off the entry ID - Remove some old comments - Rename some old variables so that they are accurate - Fix compiler warnings - Remove some unneeded copying
Diffstat (limited to 'view/sharedcache/core/SharedCacheView.cpp')
-rw-r--r--view/sharedcache/core/SharedCacheView.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/view/sharedcache/core/SharedCacheView.cpp b/view/sharedcache/core/SharedCacheView.cpp
index 049140c5..5d836ee4 100644
--- a/view/sharedcache/core/SharedCacheView.cpp
+++ b/view/sharedcache/core/SharedCacheView.cpp
@@ -912,7 +912,7 @@ bool SharedCacheView::InitController()
// Write all the slide info pointers to the virtual memory.
// This should be done before any other work begins, as the backing data will be altered by this process.
auto startTime = std::chrono::high_resolution_clock::now();
- for (const auto& [_, entry] : sharedCache.GetEntries())
+ for (const auto& entry : sharedCache.GetEntries())
sharedCache.ProcessEntrySlideInfo(entry);
auto endTime = std::chrono::high_resolution_clock::now();
std::chrono::duration<double> elapsed = endTime - startTime;
@@ -923,7 +923,7 @@ bool SharedCacheView::InitController()
// Load up all images into the cache before adding extra regions.
// Currently, it is expected that a primary entry contain all relevant images, so we only check that one.
auto startTime = std::chrono::high_resolution_clock::now();
- for (const auto& [_, entry] : sharedCache.GetEntries())
+ for (const auto& entry : sharedCache.GetEntries())
if (entry.GetType() == CacheEntryType::Primary)
sharedCache.ProcessEntryImages(entry);
auto endTime = std::chrono::high_resolution_clock::now();
@@ -936,10 +936,9 @@ bool SharedCacheView::InitController()
}
{
- // TODO: Run this up on a separate thread maybe and have callback notifications?
// Load up all the regions into the cache.
auto startTime = std::chrono::high_resolution_clock::now();
- for (const auto& [_, entry] : sharedCache.GetEntries())
+ for (const auto& entry : sharedCache.GetEntries())
sharedCache.ProcessEntryRegions(entry);
auto endTime = std::chrono::high_resolution_clock::now();
std::chrono::duration<double> elapsed = endTime - startTime;