From 38304da947c6b593ef94449894dc018aac633344 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Wed, 2 Aug 2017 18:16:56 +0200 Subject: DiscIO: Use Common::Lazy for loading filesystems This simplifies FileMonitor a lot and also lets us clean up FilesystemPanel. --- Source/Core/DiscIO/Filesystem.cpp | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'Source/Core/DiscIO/Filesystem.cpp') diff --git a/Source/Core/DiscIO/Filesystem.cpp b/Source/Core/DiscIO/Filesystem.cpp index 6171c3004f..4228afdb72 100644 --- a/Source/Core/DiscIO/Filesystem.cpp +++ b/Source/Core/DiscIO/Filesystem.cpp @@ -4,7 +4,6 @@ #include "DiscIO/Filesystem.h" #include -#include "DiscIO/FileSystemGCWii.h" #include "DiscIO/Volume.h" namespace DiscIO @@ -18,20 +17,4 @@ FileSystem::FileSystem(const Volume* volume, const Partition& partition) FileSystem::~FileSystem() = default; -std::unique_ptr CreateFileSystem(const Volume* volume, const Partition& partition) -{ - if (!volume) - return nullptr; - - std::unique_ptr filesystem = std::make_unique(volume, partition); - - if (!filesystem) - return nullptr; - - if (!filesystem->IsValid()) - filesystem.reset(); - - return filesystem; -} - } // namespace -- cgit v1.2.3 From ca36c977d9617ba188907bbe2ff2922fce121972 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Wed, 2 Aug 2017 18:34:44 +0200 Subject: DiscIO: Remove m_partition and m_volume from FileSystem The last commit made m_partition unnecessary, and m_volume has been unnecessary ever since the PR that added DiscExtractor. --- Source/Core/DiscIO/Filesystem.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'Source/Core/DiscIO/Filesystem.cpp') 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 -- cgit v1.2.3