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

@ -14,6 +14,7 @@
// detect whether the file is a compressed blob, or just a big hunk of data, or a drive, and
// automatically do the right thing.
#include <string>
#include "Common/CommonTypes.h"
namespace DiscIO
@ -63,13 +64,13 @@ public:
};
// Factory function - examines the path to choose the right type of IBlobReader, and returns one.
IBlobReader* CreateBlobReader(const char *filename);
IBlobReader* CreateBlobReader(const std::string& filename);
typedef void (*CompressCB)(const char *text, float percent, void* arg);
bool CompressFileToBlob(const char *infile, const char *outfile, u32 sub_type = 0, int sector_size = 16384,
bool CompressFileToBlob(const std::string& infile, const std::string& outfile, u32 sub_type = 0, int sector_size = 16384,
CompressCB callback = nullptr, void *arg = nullptr);
bool DecompressBlobToFile(const char *infile, const char *outfile,
bool DecompressBlobToFile(const std::string& infile, const std::string& outfile,
CompressCB callback = nullptr, void *arg = nullptr);
} // namespace