From e93fbb7c5e66ff4590ce1d693cc66e7a9868a35c Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 21 Oct 2020 14:58:08 -0400 Subject: DiscIO: Migrate logging over to fmt Eliminates quite a bit of the PRI* macros used for handling 64-bit values. --- Source/Core/DiscIO/FileSystemGCWii.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'Source/Core/DiscIO/FileSystemGCWii.cpp') diff --git a/Source/Core/DiscIO/FileSystemGCWii.cpp b/Source/Core/DiscIO/FileSystemGCWii.cpp index 7e3b3452b9..71e7fb7ff3 100644 --- a/Source/Core/DiscIO/FileSystemGCWii.cpp +++ b/Source/Core/DiscIO/FileSystemGCWii.cpp @@ -187,7 +187,7 @@ bool FileInfoGCWii::IsValid(u64 fst_size, const FileInfoGCWii& parent_directory) { if (GetNameOffset() >= fst_size) { - ERROR_LOG(DISCIO, "Impossibly large name offset in file system"); + ERROR_LOG_FMT(DISCIO, "Impossibly large name offset in file system"); return false; } @@ -195,21 +195,21 @@ bool FileInfoGCWii::IsValid(u64 fst_size, const FileInfoGCWii& parent_directory) { if (Get(EntryProperty::FILE_OFFSET) != parent_directory.m_index) { - ERROR_LOG(DISCIO, "Incorrect parent offset in file system"); + ERROR_LOG_FMT(DISCIO, "Incorrect parent offset in file system"); return false; } - u32 size = Get(EntryProperty::FILE_SIZE); + const u32 size = Get(EntryProperty::FILE_SIZE); if (size <= m_index) { - ERROR_LOG(DISCIO, "Impossibly small directory size in file system"); + ERROR_LOG_FMT(DISCIO, "Impossibly small directory size in file system"); return false; } if (size > parent_directory.Get(EntryProperty::FILE_SIZE)) { - ERROR_LOG(DISCIO, "Impossibly large directory size in file system"); + ERROR_LOG_FMT(DISCIO, "Impossibly large directory size in file system"); return false; } @@ -241,7 +241,7 @@ FileSystemGCWii::FileSystemGCWii(const VolumeDisc* volume, const Partition& part return; if (*fst_size < FST_ENTRY_SIZE) { - ERROR_LOG(DISCIO, "File system is too small"); + ERROR_LOG_FMT(DISCIO, "File system is too small"); return; } @@ -253,7 +253,7 @@ FileSystemGCWii::FileSystemGCWii(const VolumeDisc* volume, const Partition& part // Without this check, Dolphin can crash by trying to allocate too much // memory when loading a disc image with an incorrect FST size. - ERROR_LOG(DISCIO, "File system is abnormally large! Aborting loading"); + ERROR_LOG_FMT(DISCIO, "File system is abnormally large! Aborting loading"); return; } @@ -261,7 +261,7 @@ FileSystemGCWii::FileSystemGCWii(const VolumeDisc* volume, const Partition& part m_file_system_table.resize(*fst_size); if (!volume->Read(*fst_offset, *fst_size, m_file_system_table.data(), partition)) { - ERROR_LOG(DISCIO, "Couldn't read file system table"); + ERROR_LOG_FMT(DISCIO, "Couldn't read file system table"); return; } @@ -269,20 +269,20 @@ FileSystemGCWii::FileSystemGCWii(const VolumeDisc* volume, const Partition& part m_root = FileInfoGCWii(m_file_system_table.data(), offset_shift); if (!m_root.IsDirectory()) { - ERROR_LOG(DISCIO, "File system root is not a directory"); + ERROR_LOG_FMT(DISCIO, "File system root is not a directory"); return; } if (FST_ENTRY_SIZE * m_root.GetSize() > *fst_size) { - ERROR_LOG(DISCIO, "File system has too many entries for its size"); + ERROR_LOG_FMT(DISCIO, "File system has too many entries for its size"); return; } // If the FST's final byte isn't 0, FileInfoGCWii::GetName() can read past the end if (m_file_system_table[*fst_size - 1] != 0) { - ERROR_LOG(DISCIO, "File system does not end with a null byte"); + ERROR_LOG_FMT(DISCIO, "File system does not end with a null byte"); return; } -- cgit v1.2.3