From 043a863cef0cecd85d81704a2cfa89bc8964d5c0 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Mon, 14 Apr 2025 01:49:47 -0400 Subject: [SharedCache] Bubble up errors in `CacheEntry::FromFile` to the user Prior to this we would not have meaningful errors shown to the user when we fail to construct a CacheEntry from a file. Apart of trying to make the opening of shared caches clearer. --- view/sharedcache/core/SharedCache.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'view/sharedcache/core/SharedCache.h') diff --git a/view/sharedcache/core/SharedCache.h b/view/sharedcache/core/SharedCache.h index c3e0fb80..52e9a984 100644 --- a/view/sharedcache/core/SharedCache.h +++ b/view/sharedcache/core/SharedCache.h @@ -130,7 +130,7 @@ class CacheEntry public: CacheEntry(std::string filePath, std::string fileName, CacheEntryType type, dyld_cache_header header, - std::vector mappings, std::vector> images); + std::vector&& mappings, std::vector>&& images); CacheEntry() = default; CacheEntry(const CacheEntry&) = default; @@ -139,7 +139,7 @@ public: CacheEntry& operator=(CacheEntry&&) = default; // Construct a cache entry from the file on disk. - static std::optional FromFile(const std::string& filePath, const std::string& fileName, CacheEntryType type); + static CacheEntry FromFile(const std::string& filePath, const std::string& fileName, CacheEntryType type); WeakFileAccessor GetAccessor() const; -- cgit v1.3.1