mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-16 04:09:39 +00:00
Common/IOFile: Remove the Duplicate function. The duplicate handles shared a read/write position making them effectively not thread-safe.
This commit is contained in:
parent
239330017c
commit
9e2fc7f4dd
@ -101,15 +101,6 @@ bool IOFile::Close()
|
||||
return m_good;
|
||||
}
|
||||
|
||||
IOFile IOFile::Duplicate(const char openmode[]) const
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return IOFile(_fdopen(_dup(_fileno(m_file)), openmode));
|
||||
#else // _WIN32
|
||||
return IOFile(fdopen(dup(fileno(m_file)), openmode));
|
||||
#endif // _WIN32
|
||||
}
|
||||
|
||||
void IOFile::SetHandle(std::FILE* file)
|
||||
{
|
||||
Close();
|
||||
|
||||
@ -51,8 +51,6 @@ public:
|
||||
SharedAccess sh = SharedAccess::Default);
|
||||
bool Close();
|
||||
|
||||
IOFile Duplicate(const char openmode[]) const;
|
||||
|
||||
template <typename T>
|
||||
requires(std::is_trivially_copyable_v<T>)
|
||||
bool ReadArray(T* elements, size_t count, size_t* num_read = nullptr)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user