summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2020-08-03 12:44:04 +0200
committerDavid Marcec <dmarcecguzman@gmail.com>2020-08-03 13:31:28 +0200
commita5af1161c9a58616739ddaedcb900bcd7cc995f8 (patch)
tree7bec86d43a5190107534b5419a8def3375b82eaf /src/core
parentloader: Make IdentifyFile typesafe (diff)
downloadyuzu-a5af1161c9a58616739ddaedcb900bcd7cc995f8.tar
yuzu-a5af1161c9a58616739ddaedcb900bcd7cc995f8.tar.gz
yuzu-a5af1161c9a58616739ddaedcb900bcd7cc995f8.tar.bz2
yuzu-a5af1161c9a58616739ddaedcb900bcd7cc995f8.tar.lz
yuzu-a5af1161c9a58616739ddaedcb900bcd7cc995f8.tar.xz
yuzu-a5af1161c9a58616739ddaedcb900bcd7cc995f8.tar.zst
yuzu-a5af1161c9a58616739ddaedcb900bcd7cc995f8.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/loader/loader.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp
index c4905550a..b8f8f1448 100644
--- a/src/core/loader/loader.cpp
+++ b/src/core/loader/loader.cpp
@@ -23,6 +23,8 @@
namespace Loader {
+namespace {
+
template <Common::IsBaseOf<AppLoader> T>
std::optional<FileType> IdentifyFileLoader(FileSys::VirtualFile file) {
const auto file_type = T::IdentifyType(file);
@@ -32,6 +34,8 @@ std::optional<FileType> IdentifyFileLoader(FileSys::VirtualFile file) {
return std::nullopt;
}
+} // namespace
+
FileType IdentifyFile(FileSys::VirtualFile file) {
if (const auto romdir_type = IdentifyFileLoader<AppLoader_DeconstructedRomDirectory>(file)) {
return *romdir_type;