Optimisation of the smart pointer in PSPLoader and ISOFileSystem

This commit is contained in:
EssaBoy 2024-10-18 23:56:57 +02:00
parent a7e7b9161a
commit 1928361085
2 changed files with 3 additions and 4 deletions

View File

@ -106,7 +106,7 @@ private:
// the filenames to "", to achieve this.
class ISOBlockSystem : public IFileSystem {
public:
ISOBlockSystem(std::shared_ptr<IFileSystem> isoFileSystem) : isoFileSystem_(isoFileSystem) {}
ISOBlockSystem(std::shared_ptr<IFileSystem> isoFileSystem) : isoFileSystem_(std::move(isoFileSystem)) {}
void DoState(PointerWrap &p) override {
// This is a bit iffy, as block device savestates already are iffy (loads/saves multiple times for multiple mounts..)

View File

@ -92,9 +92,8 @@ void InitMemoryForGameISO(FileLoader *fileLoader) {
if (!bd)
return;
auto iso = std::make_shared<ISOFileSystem>(&pspFileSystem, bd);
fileSystem = iso;
blockSystem = std::make_shared<ISOBlockSystem>(iso);
fileSystem = std::make_shared<ISOFileSystem>(&pspFileSystem, bd);
blockSystem = std::make_shared<ISOBlockSystem>(fileSystem);
}
pspFileSystem.Mount("umd0:", blockSystem);