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

@ -939,12 +939,12 @@ std::string GetThemeDir(const std::string& theme_name)
return dir;
}
bool WriteStringToFile(const std::string &str, const char *filename)
bool WriteStringToFile(const std::string &str, const std::string& filename)
{
return File::IOFile(filename, "wb").WriteBytes(str.data(), str.size());
}
bool ReadFileToString(const char *filename, std::string &str)
bool ReadFileToString(const std::string& filename, std::string &str)
{
File::IOFile file(filename, "rb");
auto const f = file.GetHandle();