From 4790bb907db5ff53b8bd62cc93c65fc2749b1fc4 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 18 Jul 2018 23:16:10 -0400 Subject: 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. --- src/core/file_sys/content_archive.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/core/file_sys/content_archive.h b/src/core/file_sys/content_archive.h index d4517d20e..0b8b9db61 100644 --- a/src/core/file_sys/content_archive.h +++ b/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 pfs) { +inline bool IsDirectoryExeFS(const std::shared_ptr& pfs) { // According to switchbrew, an exefs must only contain these two files: return pfs->GetFile("main") != nullptr && pfs->GetFile("main.npdm") != nullptr; } -- cgit v1.2.3