summaryrefslogtreecommitdiff
path: root/view/sharedcache/core/SharedCache.h
diff options
context:
space:
mode:
authorMason Reed <mason@vector35.com>2025-04-14 01:49:47 -0400
committerMason Reed <mason@vector35.com>2025-04-14 03:20:51 -0400
commit043a863cef0cecd85d81704a2cfa89bc8964d5c0 (patch)
treeac15b1ab5880b238b62b5b1065ead81136051c0f /view/sharedcache/core/SharedCache.h
parent664bdcd29761844ba9558f9c5fd43949009424e3 (diff)
[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.
Diffstat (limited to 'view/sharedcache/core/SharedCache.h')
-rw-r--r--view/sharedcache/core/SharedCache.h4
1 files changed, 2 insertions, 2 deletions
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<dyld_cache_mapping_info> mappings, std::vector<std::pair<std::string, dyld_cache_image_info>> images);
+ std::vector<dyld_cache_mapping_info>&& mappings, std::vector<std::pair<std::string, dyld_cache_image_info>>&& 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<CacheEntry> 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;