From a3149536e2b8811595d39a9bec522f2d225406cb Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 27 Nov 2019 05:07:08 -0500 Subject: file_sys/directory: Make EntryType an enum class This can trivially be an enum class rather than a regular enum, making it more strongly typed. --- src/core/file_sys/directory.h | 2 +- src/core/hle/service/filesystem/fsp_srv.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/core/file_sys/directory.h b/src/core/file_sys/directory.h index 7b5c509fb..0d73eecc9 100644 --- a/src/core/file_sys/directory.h +++ b/src/core/file_sys/directory.h @@ -15,7 +15,7 @@ namespace FileSys { -enum EntryType : u8 { +enum class EntryType : u8 { Directory = 0, File = 1, }; diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index 5874ed6bd..ea9cc901e 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp @@ -256,8 +256,8 @@ public: // TODO(DarkLordZach): Verify that this is the correct behavior. // Build entry index now to save time later. - BuildEntryIndex(entries, backend->GetFiles(), FileSys::File); - BuildEntryIndex(entries, backend->GetSubdirectories(), FileSys::Directory); + BuildEntryIndex(entries, backend->GetFiles(), FileSys::EntryType::File); + BuildEntryIndex(entries, backend->GetSubdirectories(), FileSys::EntryType::Directory); } private: -- cgit v1.2.3