summaryrefslogtreecommitdiff
path: root/Source/Core/DiscIO/FileSystemGCWii.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-10-21 14:58:08 -0400
committerLioncash <mathew1800@gmail.com>2020-10-22 15:41:42 -0400
commite93fbb7c5e66ff4590ce1d693cc66e7a9868a35c (patch)
tree7e6d9219301ec08798fe3cf6b74e27a78105e35b /Source/Core/DiscIO/FileSystemGCWii.cpp
parent09e87b79f19ce0fb06b236e15ebed414af57558a (diff)
DiscIO: Migrate logging over to fmt
Eliminates quite a bit of the PRI* macros used for handling 64-bit values.
Diffstat (limited to 'Source/Core/DiscIO/FileSystemGCWii.cpp')
-rw-r--r--Source/Core/DiscIO/FileSystemGCWii.cpp22
1 files changed, 11 insertions, 11 deletions
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;
}