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:
Jordan Woyak 2025-10-28 22:45:21 -05:00
parent 239330017c
commit 9e2fc7f4dd
2 changed files with 0 additions and 11 deletions

View File

@ -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();

View File

@ -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)