Skip to content
Snippets Groups Projects
Commit 57c4d7aa authored by Lioncash's avatar Lioncash
Browse files

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.
parent 458fdda7
No related branches found
No related tags found
No related merge requests found
...@@ -97,9 +97,8 @@ void PartitionFilesystem::PrintDebugInfo() const { ...@@ -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());
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment