From b8d8c7370f9f9dabdf3964b403e4ae7666740136 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Wed, 7 Jun 2017 21:13:24 +0200 Subject: [PATCH] DirectoryBlob: Move constants to .cpp file --- Source/Core/DiscIO/DirectoryBlob.cpp | 12 +++++++++--- Source/Core/DiscIO/DirectoryBlob.h | 9 --------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/Source/Core/DiscIO/DirectoryBlob.cpp b/Source/Core/DiscIO/DirectoryBlob.cpp index 9425869f26..dc262c6509 100644 --- a/Source/Core/DiscIO/DirectoryBlob.cpp +++ b/Source/Core/DiscIO/DirectoryBlob.cpp @@ -34,15 +34,21 @@ static u32 ComputeNameSize(const File::FSTEntry& parent_entry); static std::string ASCIIToUppercase(std::string str); static void ConvertUTF8NamesToSHIFTJIS(File::FSTEntry& parent_entry); +constexpr u8 ENTRY_SIZE = 0x0c; +constexpr u8 FILE_ENTRY = 0; +constexpr u8 DIRECTORY_ENTRY = 1; +constexpr u64 DISKHEADER_ADDRESS = 0; +constexpr u64 DISKHEADERINFO_ADDRESS = 0x440; +constexpr u64 APPLOADER_ADDRESS = 0x2440; +constexpr size_t MAX_NAME_LENGTH = 0x3df; +constexpr size_t MAX_ID_LENGTH = 6; + constexpr u64 GAME_PARTITION_ADDRESS = 0x50000; constexpr u64 PARTITION_TABLE_ADDRESS = 0x40000; const std::array PARTITION_TABLE = { {Common::swap32(1), Common::swap32((PARTITION_TABLE_ADDRESS + 0x20) >> 2), 0, 0, 0, 0, 0, 0, Common::swap32(GAME_PARTITION_ADDRESS >> 2), 0}}; -const size_t DirectoryBlobReader::MAX_NAME_LENGTH; -const size_t DirectoryBlobReader::MAX_ID_LENGTH; - static bool PathCharactersEqual(char a, char b) { return a == b diff --git a/Source/Core/DiscIO/DirectoryBlob.h b/Source/Core/DiscIO/DirectoryBlob.h index f79929615d..fef7d83c46 100644 --- a/Source/Core/DiscIO/DirectoryBlob.h +++ b/Source/Core/DiscIO/DirectoryBlob.h @@ -121,15 +121,6 @@ private: u64 m_fst_address; u64 m_dol_address; - - static constexpr u8 ENTRY_SIZE = 0x0c; - static constexpr u8 FILE_ENTRY = 0; - static constexpr u8 DIRECTORY_ENTRY = 1; - static constexpr u64 DISKHEADER_ADDRESS = 0; - static constexpr u64 DISKHEADERINFO_ADDRESS = 0x440; - static constexpr u64 APPLOADER_ADDRESS = 0x2440; - static const size_t MAX_NAME_LENGTH = 0x3df; - static const size_t MAX_ID_LENGTH = 6; }; } // namespace