mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
IOFile: Rename Clear() to ClearError() for clarity.
This commit is contained in:
@ -94,7 +94,7 @@ bool IOFile::Close()
|
|||||||
void IOFile::SetHandle(std::FILE* file)
|
void IOFile::SetHandle(std::FILE* file)
|
||||||
{
|
{
|
||||||
Close();
|
Close();
|
||||||
Clear();
|
ClearError();
|
||||||
m_file = file;
|
m_file = file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ public:
|
|||||||
bool Flush();
|
bool Flush();
|
||||||
|
|
||||||
// clear error state
|
// clear error state
|
||||||
void Clear()
|
void ClearError()
|
||||||
{
|
{
|
||||||
m_good = true;
|
m_good = true;
|
||||||
std::clearerr(m_file);
|
std::clearerr(m_file);
|
||||||
|
@ -100,7 +100,7 @@ public:
|
|||||||
|
|
||||||
m_num_entries++;
|
m_num_entries++;
|
||||||
}
|
}
|
||||||
m_file.Clear();
|
m_file.ClearError();
|
||||||
m_file.Seek(last_valid_value_start, File::SeekOrigin::Begin);
|
m_file.Seek(last_valid_value_start, File::SeekOrigin::Begin);
|
||||||
|
|
||||||
return m_num_entries;
|
return m_num_entries;
|
||||||
|
@ -69,7 +69,7 @@ bool CISOFileReader::Read(u64 offset, u64 nbytes, u8* out_ptr)
|
|||||||
if (!(m_file.Seek(file_off, File::SeekOrigin::Begin) &&
|
if (!(m_file.Seek(file_off, File::SeekOrigin::Begin) &&
|
||||||
m_file.ReadArray(out_ptr, bytes_to_read)))
|
m_file.ReadArray(out_ptr, bytes_to_read)))
|
||||||
{
|
{
|
||||||
m_file.Clear();
|
m_file.ClearError();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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.",
|
ERROR_LOG_FMT(DISCIO, "The disc image \"{}\" is truncated, some of the data is missing.",
|
||||||
m_file_name);
|
m_file_name);
|
||||||
m_file.Clear();
|
m_file.ClearError();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ bool DriveReader::ReadMultipleAlignedBlocks(u64 block_num, u64 num_blocks, u8* o
|
|||||||
m_file.Seek(GetSectorSize() * block_num, File::SeekOrigin::Begin);
|
m_file.Seek(GetSectorSize() * block_num, File::SeekOrigin::Begin);
|
||||||
if (m_file.ReadBytes(out_ptr, num_blocks * GetSectorSize()))
|
if (m_file.ReadBytes(out_ptr, num_blocks * GetSectorSize()))
|
||||||
return true;
|
return true;
|
||||||
m_file.Clear();
|
m_file.ClearError();
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ bool PlainFileReader::Read(u64 offset, u64 nbytes, u8* out_ptr)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_file.Clear();
|
m_file.ClearError();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@ bool TGCFileReader::Read(u64 offset, u64 nbytes, u8* out_ptr)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_file.Clear();
|
m_file.ClearError();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ bool WbfsFileReader::Read(u64 offset, u64 nbytes, u8* out_ptr)
|
|||||||
|
|
||||||
if (!data_file.ReadBytes(out_ptr, read_size))
|
if (!data_file.ReadBytes(out_ptr, read_size))
|
||||||
{
|
{
|
||||||
data_file.Clear();
|
data_file.ClearError();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user