remove construct-and-open RageFile ctor
This commit is contained in:
@@ -1610,9 +1610,8 @@ void GameState::StoreRankingName( PlayerNumber pn, CString name )
|
|||||||
// Filter swear words from name
|
// Filter swear words from name
|
||||||
//
|
//
|
||||||
name.MakeUpper();
|
name.MakeUpper();
|
||||||
RageFile file(NAMES_BLACKLIST_FILE);
|
RageFile file;
|
||||||
|
if( file.Open(NAMES_BLACKLIST_FILE) )
|
||||||
if (file.IsOpen())
|
|
||||||
{
|
{
|
||||||
CString line;
|
CString line;
|
||||||
|
|
||||||
|
|||||||
@@ -20,11 +20,10 @@ bool LyricsLoader::LoadFromLRCFile(const CString& sPath, Song& out)
|
|||||||
{
|
{
|
||||||
LOG->Trace( "LyricsLoader::LoadFromLRCFile(%s)", sPath.c_str() );
|
LOG->Trace( "LyricsLoader::LoadFromLRCFile(%s)", sPath.c_str() );
|
||||||
|
|
||||||
RageFile input( sPath );
|
RageFile input;
|
||||||
|
if( !input.Open(sPath) )
|
||||||
if (!input.IsOpen())
|
|
||||||
{
|
{
|
||||||
LOG->Warn("Error opening file '%s' for reading.", sPath.c_str());
|
LOG->Warn("Error opening file '%s' for reading: %s", sPath.c_str(), input.GetError().c_str() );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -604,10 +604,9 @@ bool BMSLoader::LoadFromDir( CString sDir, Song &out )
|
|||||||
* rather than open the file again. However, I'm not changing the logic,
|
* rather than open the file again. However, I'm not changing the logic,
|
||||||
* only the implementation. -- Steve
|
* only the implementation. -- Steve
|
||||||
*/
|
*/
|
||||||
RageFile file(sPath); //Why doesn't VC6 bitch here but it does with int??
|
RageFile file;
|
||||||
|
if( !file.Open(sPath) )
|
||||||
if (!file.IsOpen())
|
RageException::Throw( "Failed to open %s for reading: %s", sPath.c_str(), file.GetError().c_str() );
|
||||||
RageException::Throw( "Failed to open %s for reading.", sPath.c_str() );
|
|
||||||
while (!file.AtEOF())
|
while (!file.AtEOF())
|
||||||
{
|
{
|
||||||
CString line;
|
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
|
// 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??
|
RageFile file;
|
||||||
|
if( !file.Open(sPath) )
|
||||||
if (!file.IsOpen())
|
RageException::Throw( "Failed to open %s for reading: %s", sPath.c_str(), file.GetError().c_str() );
|
||||||
RageException::Throw( "Failed to open %s for reading.", sPath.c_str() );
|
|
||||||
while (!file.AtEOF())
|
while (!file.AtEOF())
|
||||||
{
|
{
|
||||||
CString line;
|
CString line;
|
||||||
|
|||||||
@@ -11,15 +11,6 @@ RageFile::RageFile()
|
|||||||
m_FilePos = 0;
|
m_FilePos = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
RageFile::RageFile( const CString& path, int mode )
|
|
||||||
{
|
|
||||||
m_File = NULL;
|
|
||||||
m_BufAvail = 0;
|
|
||||||
m_EOF = false;
|
|
||||||
m_FilePos = 0;
|
|
||||||
Open(path, mode);
|
|
||||||
}
|
|
||||||
|
|
||||||
RageFile::RageFile( const RageFile &cpy )
|
RageFile::RageFile( const RageFile &cpy )
|
||||||
{
|
{
|
||||||
ResetBuf();
|
ResetBuf();
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
RageFile();
|
RageFile();
|
||||||
RageFile( const CString& path, int mode = READ );
|
|
||||||
~RageFile() { Close(); }
|
~RageFile() { Close(); }
|
||||||
RageFile( const RageFile &cpy );
|
RageFile( const RageFile &cpy );
|
||||||
|
|
||||||
|
|||||||
@@ -45,9 +45,8 @@ bool RageMovieTexture::GetFourCC( CString fn, CString &handler, CString &type )
|
|||||||
return false; \
|
return false; \
|
||||||
}
|
}
|
||||||
|
|
||||||
RageFile file(fn);
|
RageFile file;
|
||||||
|
if( !file.Open(fn) )
|
||||||
if( !file.IsOpen() )
|
|
||||||
HANDLE_ERROR("Could not open file.");
|
HANDLE_ERROR("Could not open file.");
|
||||||
if( !file.Seek(0x70) )
|
if( !file.Seek(0x70) )
|
||||||
HANDLE_ERROR("Could not seek.");
|
HANDLE_ERROR("Could not seek.");
|
||||||
|
|||||||
Reference in New Issue
Block a user