Jelajahi Sumber

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.
Lioncash 8 tahun lalu
induk
melakukan
4790bb907d
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      src/core/file_sys/content_archive.h

+ 1 - 1
src/core/file_sys/content_archive.h

@@ -53,7 +53,7 @@ struct NCAHeader {
 };
 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:
     return pfs->GetFile("main") != nullptr && pfs->GetFile("main.npdm") != nullptr;
 }