2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

partition_filesystem: Remove dynamic_cast in PrintDebugInfo()

We shouldn't be upcasting our file instances. Given a
PartitionFilesystem is currently designed to accept any arbitrary
VfsFile instances, casting to a more specific type than that is just bad
design, and shows an interface design issue.
This commit is contained in:
Lioncash 2018-07-29 06:13:10 -04:00
parent 458fdda700
commit 57c4d7aa00

View file

@ -97,9 +97,8 @@ void PartitionFilesystem::PrintDebugInfo() const {
LOG_DEBUG(Service_FS, "Magic: {:.4}", pfs_header.magic); LOG_DEBUG(Service_FS, "Magic: {:.4}", pfs_header.magic);
LOG_DEBUG(Service_FS, "Files: {}", pfs_header.num_entries); LOG_DEBUG(Service_FS, "Files: {}", pfs_header.num_entries);
for (u32 i = 0; i < pfs_header.num_entries; i++) { for (u32 i = 0; i < pfs_header.num_entries; i++) {
LOG_DEBUG(Service_FS, " > File {}: {} (0x{:X} bytes, at 0x{:X})", i, LOG_DEBUG(Service_FS, " > File {}: {} (0x{:X} bytes)", i,
pfs_files[i]->GetName(), pfs_files[i]->GetSize(), pfs_files[i]->GetName(), pfs_files[i]->GetSize());
dynamic_cast<OffsetVfsFile*>(pfs_files[i].get())->GetOffset());
} }
} }