- handled all other uses of fopen that could reasonably converted to FileReader or FileWriter.

This commit is contained in:
Christoph Oelckers 2017-12-02 14:24:28 +01:00
commit 7d0759e2fa
5 changed files with 20 additions and 20 deletions

View file

@ -87,13 +87,18 @@ FileReader::FileReader (FILE *file, long length)
FilePos = StartPos = ftell (file);
}
FileReader::~FileReader ()
FileReader::~FileReader()
{
Close();
}
void FileReader::Close()
{
if (CloseOnDestruct && File != NULL)
{
fclose (File);
File = NULL;
}
File = NULL;
}
bool FileReader::Open (const char *filename)