diff --git a/Source/Core/DiscIO/FileSystemGCWii.cpp b/Source/Core/DiscIO/FileSystemGCWii.cpp index 55afc907c9..e243d0ec72 100644 --- a/Source/Core/DiscIO/FileSystemGCWii.cpp +++ b/Source/Core/DiscIO/FileSystemGCWii.cpp @@ -185,19 +185,19 @@ bool FileInfoGCWii::IsValid(u64 fst_size, const FileInfoGCWii& parent_directory) } FileSystemGCWii::FileSystemGCWii(const Volume* volume, const Partition& partition) - : FileSystem(volume, partition), m_valid(false), m_root(nullptr, 0, 0, 0) + : m_valid(false), m_root(nullptr, 0, 0, 0) { u8 offset_shift; // Check if this is a GameCube or Wii disc - if (m_volume->ReadSwapped(0x18, m_partition) == u32(0x5D1C9EA3)) + if (volume->ReadSwapped(0x18, partition) == u32(0x5D1C9EA3)) offset_shift = 2; // Wii file system - else if (m_volume->ReadSwapped(0x1c, m_partition) == u32(0xC2339F3D)) + else if (volume->ReadSwapped(0x1c, partition) == u32(0xC2339F3D)) offset_shift = 0; // GameCube file system else return; // Invalid partition (maybe someone removed its data but not its partition table entry) - const std::optional fst_offset = GetFSTOffset(*m_volume, m_partition); - const std::optional fst_size = GetFSTSize(*m_volume, m_partition); + const std::optional fst_offset = GetFSTOffset(*volume, partition); + const std::optional fst_size = GetFSTSize(*volume, partition); if (!fst_offset || !fst_size) return; if (*fst_size < FST_ENTRY_SIZE) @@ -220,7 +220,7 @@ FileSystemGCWii::FileSystemGCWii(const Volume* volume, const Partition& partitio // Read the whole FST m_file_system_table.resize(*fst_size); - if (!m_volume->Read(*fst_offset, *fst_size, m_file_system_table.data(), m_partition)) + if (!volume->Read(*fst_offset, *fst_size, m_file_system_table.data(), partition)) { ERROR_LOG(DISCIO, "Couldn't read file system table"); return; diff --git a/Source/Core/DiscIO/Filesystem.cpp b/Source/Core/DiscIO/Filesystem.cpp index 4228afdb72..9e5336db5d 100644 --- a/Source/Core/DiscIO/Filesystem.cpp +++ b/Source/Core/DiscIO/Filesystem.cpp @@ -3,18 +3,11 @@ // Refer to the license.txt file included. #include "DiscIO/Filesystem.h" -#include -#include "DiscIO/Volume.h" namespace DiscIO { FileInfo::~FileInfo() = default; -FileSystem::FileSystem(const Volume* volume, const Partition& partition) - : m_volume(volume), m_partition(partition) -{ -} - FileSystem::~FileSystem() = default; } // namespace diff --git a/Source/Core/DiscIO/Filesystem.h b/Source/Core/DiscIO/Filesystem.h index 3193e6ca64..8d2adbd0a2 100644 --- a/Source/Core/DiscIO/Filesystem.h +++ b/Source/Core/DiscIO/Filesystem.h @@ -106,7 +106,6 @@ protected: class FileSystem { public: - FileSystem(const Volume* volume, const Partition& partition); virtual ~FileSystem(); // If IsValid is false, GetRoot must not be called. @@ -118,11 +117,6 @@ public: virtual std::unique_ptr FindFileInfo(const std::string& path) const = 0; // Returns nullptr if not found virtual std::unique_ptr FindFileInfo(u64 disc_offset) const = 0; - - virtual const Partition GetPartition() const { return m_partition; } -protected: - const Volume* const m_volume; - const Partition m_partition; }; // Calling Volume::GetFileSystem instead of manually constructing a filesystem is recommended,