remove construct-and-open RageFile ctor

This commit is contained in:
Glenn Maynard
2004-09-25 02:50:31 +00:00
parent ec44af425a
commit 2e6ffb73e0
6 changed files with 13 additions and 28 deletions
+6 -8
View File
@@ -604,10 +604,9 @@ bool BMSLoader::LoadFromDir( CString sDir, Song &out )
* rather than open the file again. However, I'm not changing the logic,
* only the implementation. -- Steve
*/
RageFile file(sPath); //Why doesn't VC6 bitch here but it does with int??
if (!file.IsOpen())
RageException::Throw( "Failed to open %s for reading.", sPath.c_str() );
RageFile file;
if( !file.Open(sPath) )
RageException::Throw( "Failed to open %s for reading: %s", sPath.c_str(), file.GetError().c_str() );
while (!file.AtEOF())
{
CString line;
@@ -663,10 +662,9 @@ bool BMSLoader::LoadFromDir( CString sDir, Song &out )
// open the song file again and and look for this tag's value
RageFile file(sPath); //Why doesn't VC6 bitch here but it does with int??
if (!file.IsOpen())
RageException::Throw( "Failed to open %s for reading.", sPath.c_str() );
RageFile file;
if( !file.Open(sPath) )
RageException::Throw( "Failed to open %s for reading: %s", sPath.c_str(), file.GetError().c_str() );
while (!file.AtEOF())
{
CString line;