diff --git a/Source/Core/Common/IOFile.cpp b/Source/Core/Common/IOFile.cpp index e0f16582be..374c56ac6f 100644 --- a/Source/Core/Common/IOFile.cpp +++ b/Source/Core/Common/IOFile.cpp @@ -94,7 +94,7 @@ bool IOFile::Close() void IOFile::SetHandle(std::FILE* file) { Close(); - Clear(); + ClearError(); m_file = file; } diff --git a/Source/Core/Common/IOFile.h b/Source/Core/Common/IOFile.h index 21c2ff6fcf..0c14fad838 100644 --- a/Source/Core/Common/IOFile.h +++ b/Source/Core/Common/IOFile.h @@ -103,7 +103,7 @@ public: bool Flush(); // clear error state - void Clear() + void ClearError() { m_good = true; std::clearerr(m_file); diff --git a/Source/Core/Common/LinearDiskCache.h b/Source/Core/Common/LinearDiskCache.h index 541accf8d3..46ebde56fa 100644 --- a/Source/Core/Common/LinearDiskCache.h +++ b/Source/Core/Common/LinearDiskCache.h @@ -100,7 +100,7 @@ public: m_num_entries++; } - m_file.Clear(); + m_file.ClearError(); m_file.Seek(last_valid_value_start, File::SeekOrigin::Begin); return m_num_entries; diff --git a/Source/Core/DiscIO/CISOBlob.cpp b/Source/Core/DiscIO/CISOBlob.cpp index f8144eec33..28408402b8 100644 --- a/Source/Core/DiscIO/CISOBlob.cpp +++ b/Source/Core/DiscIO/CISOBlob.cpp @@ -69,7 +69,7 @@ bool CISOFileReader::Read(u64 offset, u64 nbytes, u8* out_ptr) if (!(m_file.Seek(file_off, File::SeekOrigin::Begin) && m_file.ReadArray(out_ptr, bytes_to_read))) { - m_file.Clear(); + m_file.ClearError(); return false; } } diff --git a/Source/Core/DiscIO/CompressedBlob.cpp b/Source/Core/DiscIO/CompressedBlob.cpp index f537d8b583..056c2f4fd3 100644 --- a/Source/Core/DiscIO/CompressedBlob.cpp +++ b/Source/Core/DiscIO/CompressedBlob.cpp @@ -109,7 +109,7 @@ bool CompressedBlobReader::GetBlock(u64 block_num, u8* out_ptr) { ERROR_LOG_FMT(DISCIO, "The disc image \"{}\" is truncated, some of the data is missing.", m_file_name); - m_file.Clear(); + m_file.ClearError(); return false; } diff --git a/Source/Core/DiscIO/DriveBlob.cpp b/Source/Core/DiscIO/DriveBlob.cpp index 000915692c..033a6d257c 100644 --- a/Source/Core/DiscIO/DriveBlob.cpp +++ b/Source/Core/DiscIO/DriveBlob.cpp @@ -153,7 +153,7 @@ bool DriveReader::ReadMultipleAlignedBlocks(u64 block_num, u64 num_blocks, u8* o m_file.Seek(GetSectorSize() * block_num, File::SeekOrigin::Begin); if (m_file.ReadBytes(out_ptr, num_blocks * GetSectorSize())) return true; - m_file.Clear(); + m_file.ClearError(); return false; #endif } diff --git a/Source/Core/DiscIO/FileBlob.cpp b/Source/Core/DiscIO/FileBlob.cpp index 8a9cfafcdc..e185fe9cc2 100644 --- a/Source/Core/DiscIO/FileBlob.cpp +++ b/Source/Core/DiscIO/FileBlob.cpp @@ -36,7 +36,7 @@ bool PlainFileReader::Read(u64 offset, u64 nbytes, u8* out_ptr) } else { - m_file.Clear(); + m_file.ClearError(); return false; } } diff --git a/Source/Core/DiscIO/TGCBlob.cpp b/Source/Core/DiscIO/TGCBlob.cpp index b0571726fa..c61d0763a4 100644 --- a/Source/Core/DiscIO/TGCBlob.cpp +++ b/Source/Core/DiscIO/TGCBlob.cpp @@ -121,7 +121,7 @@ bool TGCFileReader::Read(u64 offset, u64 nbytes, u8* out_ptr) return true; } - m_file.Clear(); + m_file.ClearError(); return false; } diff --git a/Source/Core/DiscIO/WbfsBlob.cpp b/Source/Core/DiscIO/WbfsBlob.cpp index 74351ccb39..d35b0b76a4 100644 --- a/Source/Core/DiscIO/WbfsBlob.cpp +++ b/Source/Core/DiscIO/WbfsBlob.cpp @@ -127,7 +127,7 @@ bool WbfsFileReader::Read(u64 offset, u64 nbytes, u8* out_ptr) if (!data_file.ReadBytes(out_ptr, read_size)) { - data_file.Clear(); + data_file.ClearError(); return false; }