diff options
author | Lioncash <mathew1800@gmail.com> | 2018-10-16 15:05:47 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-10-16 15:38:52 +0200 |
commit | 39ae73b356a253036283b114855f8c5ddbb20f49 (patch) | |
tree | b36ca87fcca87afb202c637bc2e5ee2ca6d9d823 /src/core/file_sys/registered_cache.cpp | |
parent | Merge pull request #1473 from lioncash/cmake (diff) | |
download | yuzu-39ae73b356a253036283b114855f8c5ddbb20f49.tar yuzu-39ae73b356a253036283b114855f8c5ddbb20f49.tar.gz yuzu-39ae73b356a253036283b114855f8c5ddbb20f49.tar.bz2 yuzu-39ae73b356a253036283b114855f8c5ddbb20f49.tar.lz yuzu-39ae73b356a253036283b114855f8c5ddbb20f49.tar.xz yuzu-39ae73b356a253036283b114855f8c5ddbb20f49.tar.zst yuzu-39ae73b356a253036283b114855f8c5ddbb20f49.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/file_sys/registered_cache.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/file_sys/registered_cache.cpp b/src/core/file_sys/registered_cache.cpp index e9b040689..1febb398e 100644 --- a/src/core/file_sys/registered_cache.cpp +++ b/src/core/file_sys/registered_cache.cpp @@ -308,14 +308,14 @@ VirtualFile RegisteredCache::GetEntryRaw(RegisteredCacheEntry entry) const { return GetEntryRaw(entry.title_id, entry.type); } -std::shared_ptr<NCA> RegisteredCache::GetEntry(u64 title_id, ContentRecordType type) const { +std::unique_ptr<NCA> RegisteredCache::GetEntry(u64 title_id, ContentRecordType type) const { const auto raw = GetEntryRaw(title_id, type); if (raw == nullptr) return nullptr; - return std::make_shared<NCA>(raw); + return std::make_unique<NCA>(raw); } -std::shared_ptr<NCA> RegisteredCache::GetEntry(RegisteredCacheEntry entry) const { +std::unique_ptr<NCA> RegisteredCache::GetEntry(RegisteredCacheEntry entry) const { return GetEntry(entry.title_id, entry.type); } @@ -516,7 +516,7 @@ bool RegisteredCache::RawInstallYuzuMeta(const CNMT& cnmt) { }) != yuzu_meta.end(); } -RegisteredCacheUnion::RegisteredCacheUnion(std::vector<std::shared_ptr<RegisteredCache>> caches) +RegisteredCacheUnion::RegisteredCacheUnion(std::vector<RegisteredCache*> caches) : caches(std::move(caches)) {} void RegisteredCacheUnion::Refresh() { @@ -572,14 +572,14 @@ VirtualFile RegisteredCacheUnion::GetEntryRaw(RegisteredCacheEntry entry) const return GetEntryRaw(entry.title_id, entry.type); } -std::shared_ptr<NCA> RegisteredCacheUnion::GetEntry(u64 title_id, ContentRecordType type) const { +std::unique_ptr<NCA> RegisteredCacheUnion::GetEntry(u64 title_id, ContentRecordType type) const { const auto raw = GetEntryRaw(title_id, type); if (raw == nullptr) return nullptr; - return std::make_shared<NCA>(raw); + return std::make_unique<NCA>(raw); } -std::shared_ptr<NCA> RegisteredCacheUnion::GetEntry(RegisteredCacheEntry entry) const { +std::unique_ptr<NCA> RegisteredCacheUnion::GetEntry(RegisteredCacheEntry entry) const { return GetEntry(entry.title_id, entry.type); } |