Core/File: Remove useless SetOpenMode method (equivalent to Open)

Former-commit-id: e02f4f758adfd2c0870920997acac71a47d51c3f
This commit is contained in:
Lynix 2015-11-18 18:27:01 +01:00
parent ddc343a630
commit 00423c4211
2 changed files with 0 additions and 31 deletions

View File

@ -71,7 +71,6 @@ namespace Nz
bool SetCursorPos(UInt64 offset) override;
void SetEndianness(Endianness endianness);
bool SetFile(const String& filePath);
bool SetOpenMode(UInt32 openMode);
using OutputStream::Write;
std::size_t Write(const void* buffer, std::size_t size) override;

View File

@ -344,36 +344,6 @@ namespace Nz
return true;
}
bool File::SetOpenMode(unsigned int openMode)
{
NazaraLock(m_mutex)
if (openMode == OpenMode_Current || openMode == m_openMode)
return true;
if (IsOpen())
{
std::unique_ptr<FileImpl> impl(new FileImpl(this));
if (!impl->Open(m_filePath, openMode))
{
NazaraError("Failed to open file with new mode: " + Error::GetLastSystemError());
return false;
}
m_impl->Close();
delete m_impl;
m_impl = impl.release();
if (m_openMode & OpenMode_Text)
m_streamOptions |= StreamOption_Text;
}
m_openMode = openMode;
return true;
}
std::size_t File::Write(const void* buffer, std::size_t size)
{
NazaraLock(m_mutex)