Skip to content
Snippets Groups Projects
Commit 4790bb90 authored by Lioncash's avatar Lioncash
Browse files

content_archive: Make IsDirectoryExeFS() take a shared_ptr as a const reference

There's no need to take this by value when it's possible to avoid
unnecessary copies entirely like this.
parent 87a9bb39
No related branches found
No related tags found
No related merge requests found
...@@ -53,7 +53,7 @@ struct NCAHeader { ...@@ -53,7 +53,7 @@ struct NCAHeader {
}; };
static_assert(sizeof(NCAHeader) == 0x400, "NCAHeader has incorrect size."); static_assert(sizeof(NCAHeader) == 0x400, "NCAHeader has incorrect size.");
inline bool IsDirectoryExeFS(std::shared_ptr<FileSys::VfsDirectory> pfs) { inline bool IsDirectoryExeFS(const std::shared_ptr<VfsDirectory>& pfs) {
// According to switchbrew, an exefs must only contain these two files: // According to switchbrew, an exefs must only contain these two files:
return pfs->GetFile("main") != nullptr && pfs->GetFile("main.npdm") != nullptr; return pfs->GetFile("main") != nullptr && pfs->GetFile("main.npdm") != nullptr;
} }
......
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