diff options
| author | lizzie <lizzie@eden-emu.dev> | 2026-02-21 18:38:32 +0100 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2026-02-21 18:38:32 +0100 |
| commit | bfc720152a389c8110c814f600125ccf480075ac (patch) | |
| tree | e94ace96c18ece6dfd4238c84bd9c16449e4a8ea /src/core/file_sys/patch_manager.cpp | |
| parent | b6238d6df76ecbef12f295ee0ef702e18542f109 (diff) | |
[vfs] remove usage of 'dynamic_cast', use ankerl::map for files (#3594)
Do I need to writeout everything wrong with `dynamic_cast`?
Also the usual std::map -> `ankerl::unordered_dense::map` conversion, seems to work just fine - but of course test that updates/DLCs/mods/cheats/etc are still being applied :)
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3594
Reviewed-by: DraVee <dravee@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
Diffstat (limited to 'src/core/file_sys/patch_manager.cpp')
| -rw-r--r-- | src/core/file_sys/patch_manager.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/file_sys/patch_manager.cpp b/src/core/file_sys/patch_manager.cpp index 86c2076380..44aafb6b34 100644 --- a/src/core/file_sys/patch_manager.cpp +++ b/src/core/file_sys/patch_manager.cpp @@ -143,7 +143,7 @@ VirtualDir PatchManager::PatchExeFS(VirtualDir exefs) const { bool checked_external = false; bool checked_manual = false; - const auto* content_union = dynamic_cast<const ContentProviderUnion*>(&content_provider); + const auto* content_union = static_cast<const ContentProviderUnion*>(&content_provider); const auto update_tid = GetUpdateTitleID(title_id); if (content_union) { @@ -167,7 +167,7 @@ VirtualDir PatchManager::PatchExeFS(VirtualDir exefs) const { // Also check ManualContentProvider (for Android) if (!checked_external) { - const auto* manual_provider = dynamic_cast<const ManualContentProvider*>( + const auto* manual_provider = static_cast<const ManualContentProvider*>( content_union->GetSlotProvider(ContentProviderUnionSlot::FrontendManual)); if (manual_provider) { const auto manual_update_versions = manual_provider->ListUpdateVersions(update_tid); @@ -243,7 +243,7 @@ VirtualDir PatchManager::PatchExeFS(VirtualDir exefs) const { // Also try ManualContentProvider if (update == nullptr) { - const auto* manual_provider = dynamic_cast<const ManualContentProvider*>( + const auto* manual_provider = static_cast<const ManualContentProvider*>( content_union->GetSlotProvider(ContentProviderUnionSlot::FrontendManual)); if (manual_provider) { auto file = manual_provider->GetEntryForVersion(update_tid, ContentRecordType::Program, *enabled_version); @@ -570,7 +570,7 @@ VirtualFile PatchManager::PatchRomFS(const NCA* base_nca, VirtualFile base_romfs bool checked_external = false; bool checked_manual = false; - const auto* content_union = dynamic_cast<const ContentProviderUnion*>(&content_provider); + const auto* content_union = static_cast<const ContentProviderUnion*>(&content_provider); if (content_union) { // First, check ExternalContentProvider const auto* external_provider = content_union->GetExternalProvider(); @@ -592,7 +592,7 @@ VirtualFile PatchManager::PatchRomFS(const NCA* base_nca, VirtualFile base_romfs } if (!checked_external) { - const auto* manual_provider = dynamic_cast<const ManualContentProvider*>( + const auto* manual_provider = static_cast<const ManualContentProvider*>( content_union->GetSlotProvider(ContentProviderUnionSlot::FrontendManual)); if (manual_provider) { const auto manual_update_versions = manual_provider->ListUpdateVersions(update_tid); @@ -690,7 +690,7 @@ std::vector<Patch> PatchManager::GetPatches(VirtualFile update_raw) const { std::vector<Patch> external_update_patches; - const auto* content_union = dynamic_cast<const ContentProviderUnion*>(&content_provider); + const auto* content_union = static_cast<const ContentProviderUnion*>(&content_provider); if (content_union) { // First, check ExternalContentProvider for updates @@ -721,7 +721,7 @@ std::vector<Patch> PatchManager::GetPatches(VirtualFile update_raw) const { } } - const auto* manual_provider = dynamic_cast<const ManualContentProvider*>( + const auto* manual_provider = static_cast<const ManualContentProvider*>( content_union->GetSlotProvider(ContentProviderUnionSlot::FrontendManual)); if (manual_provider && external_update_patches.empty()) { const auto manual_update_versions = manual_provider->ListUpdateVersions(update_tid); |
