diff options
author | Zach Hilman <zachhilman@gmail.com> | 2019-06-26 04:25:10 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2019-06-26 04:25:10 +0200 |
commit | d10fc2d7277cf075f875fe2831501cb79c50e21a (patch) | |
tree | a1ef0e65dfd79f8badde8dcd24014432428c51f8 /src/core/file_sys/registered_cache.cpp | |
parent | core: Keep track of ARPManager and register current application on boot (diff) | |
download | yuzu-d10fc2d7277cf075f875fe2831501cb79c50e21a.tar yuzu-d10fc2d7277cf075f875fe2831501cb79c50e21a.tar.gz yuzu-d10fc2d7277cf075f875fe2831501cb79c50e21a.tar.bz2 yuzu-d10fc2d7277cf075f875fe2831501cb79c50e21a.tar.lz yuzu-d10fc2d7277cf075f875fe2831501cb79c50e21a.tar.xz yuzu-d10fc2d7277cf075f875fe2831501cb79c50e21a.tar.zst yuzu-d10fc2d7277cf075f875fe2831501cb79c50e21a.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 3bb921210..4608490e0 100644 --- a/src/core/file_sys/registered_cache.cpp +++ b/src/core/file_sys/registered_cache.cpp @@ -647,16 +647,16 @@ ContentProviderUnion::ListEntriesFilterOrigin(std::optional<ContentProviderUnion std::optional<ContentProviderUnionSlot> ContentProviderUnion::GetSlotForEntry( u64 title_id, ContentRecordType type) const { - for (const auto& [slot, provider] : providers) { - if (provider == nullptr) - continue; + const auto iter = + std::find_if(providers.begin(), providers.end(), [title_id, type](const auto& provider) { + return provider.second != nullptr && provider.second->HasEntry(title_id, type); + }); - if (provider->HasEntry(title_id, type)) { - return slot; - } + if (iter == providers.end()) { + return std::nullopt; } - return std::nullopt; + return iter->first; } ManualContentProvider::~ManualContentProvider() = default; |