Kill off some usages of c_str.

Also changes some function params, but this is ok.
Some simplifications were also able to be made (ie. killing off strcmps with ==, etc).
This commit is contained in:
Lioncash
2014-03-12 15:33:41 -04:00
parent dccc6d8b47
commit a82675b7d5
170 changed files with 812 additions and 704 deletions

View File

@ -29,7 +29,7 @@ CISOFileReader::CISOFileReader(std::FILE* file)
m_ciso_map[idx] = (1 == header.map[idx]) ? count++ : UNUSED_BLOCK_ID;
}
CISOFileReader* CISOFileReader::Create(const char* filename)
CISOFileReader* CISOFileReader::Create(const std::string& filename)
{
if (IsCISOBlob(filename))
{
@ -37,7 +37,9 @@ CISOFileReader* CISOFileReader::Create(const char* filename)
return new CISOFileReader(f.ReleaseHandle());
}
else
{
return nullptr;
}
}
u64 CISOFileReader::GetDataSize() const
@ -79,7 +81,7 @@ bool CISOFileReader::Read(u64 offset, u64 nbytes, u8* out_ptr)
return true;
}
bool IsCISOBlob(const char* filename)
bool IsCISOBlob(const std::string& filename)
{
File::IOFile f(filename, "rb");