filesystem: Make CreateFactories() and InstallInterface() take a VfsFilesystem instance by reference

Neither of these functions alter the ownership of the provided pointer,
so we can simply make the parameters a reference rather than a direct
shared pointer alias. This way we also disallow passing incorrect memory values like
nullptr.
This commit is contained in:
Lioncash 2018-10-13 11:25:13 -04:00
parent 1584fb6b38
commit 0149162dba
7 changed files with 19 additions and 20 deletions

View file

@ -175,7 +175,7 @@ int main(int argc, char** argv) {
Core::System& system{Core::System::GetInstance()};
system.SetFilesystem(std::make_shared<FileSys::RealVfsFilesystem>());
Service::FileSystem::CreateFactories(system.GetFilesystem());
Service::FileSystem::CreateFactories(*system.GetFilesystem());
SCOPE_EXIT({ system.Shutdown(); });