From 1ea44f425d071ae8ad2543dea7bdd4eed7945298 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sun, 11 Jun 2017 13:47:03 +0200 Subject: [PATCH] DirectoryBlob: Change ConvertUTF8NamesToSHIFTJIS's parameter to pointer --- Source/Core/DiscIO/DirectoryBlob.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Core/DiscIO/DirectoryBlob.cpp b/Source/Core/DiscIO/DirectoryBlob.cpp index 78f4302bc9..b9cf27123b 100644 --- a/Source/Core/DiscIO/DirectoryBlob.cpp +++ b/Source/Core/DiscIO/DirectoryBlob.cpp @@ -46,7 +46,7 @@ static void Write32(u32 data, u32 offset, std::vector* buffer); static u32 ComputeNameSize(const File::FSTEntry& parent_entry); static std::string ASCIIToUppercase(std::string str); -static void ConvertUTF8NamesToSHIFTJIS(File::FSTEntry& parent_entry); +static void ConvertUTF8NamesToSHIFTJIS(File::FSTEntry* parent_entry); enum class PartitionType : u32 { @@ -553,7 +553,7 @@ void DirectoryBlobPartition::BuildFST(u64 fst_address) File::FSTEntry rootEntry = File::ScanDirectoryTree(m_root_directory + "files/", true); - ConvertUTF8NamesToSHIFTJIS(rootEntry); + ConvertUTF8NamesToSHIFTJIS(&rootEntry); u32 name_table_size = Common::AlignUp(ComputeNameSize(rootEntry), 1ull << m_address_shift); u64 total_entries = rootEntry.size + 1; // The root entry itself isn't counted in rootEntry.size @@ -700,12 +700,12 @@ static u32 ComputeNameSize(const File::FSTEntry& parent_entry) return name_size; } -static void ConvertUTF8NamesToSHIFTJIS(File::FSTEntry& parent_entry) +static void ConvertUTF8NamesToSHIFTJIS(File::FSTEntry* parent_entry) { - for (File::FSTEntry& entry : parent_entry.children) + for (File::FSTEntry& entry : parent_entry->children) { if (entry.isDirectory) - ConvertUTF8NamesToSHIFTJIS(entry); + ConvertUTF8NamesToSHIFTJIS(&entry); entry.virtualName = UTF8ToSHIFTJIS(entry.virtualName); }