From c03b9539c5f500742b69e298cd0d953f1a2c48a5 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 3 Sep 2005 21:18:27 +0000 Subject: [PATCH] RFManager doesn't track open files (avoidable overhead). Copy and delete directly. --- stepmania/src/RageFile.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/stepmania/src/RageFile.cpp b/stepmania/src/RageFile.cpp index 3caedcf499..738f730ade 100644 --- a/stepmania/src/RageFile.cpp +++ b/stepmania/src/RageFile.cpp @@ -20,7 +20,7 @@ RageFile::RageFile( const RageFile &cpy ): RageFileBasic( cpy ) { /* This will copy the file driver, including its internal file pointer. */ - m_File = FILEMAN->CopyFileObj( cpy.m_File ); + m_File = cpy.m_File->Copy(); m_Path = cpy.m_Path; m_Mode = cpy.m_Mode; } @@ -78,8 +78,7 @@ bool RageFile::Open( const CString& path, int mode ) void RageFile::Close() { - FILEMAN->Close( m_File ); - m_File = NULL; + SAFE_DELETE( m_File ); } #define ASSERT_OPEN ASSERT_M( IsOpen(), ssprintf("\"%s\" is not open.", m_Path.c_str()) );