android-5.1: use char constructor for default on c++ streams

Change-Id: I4be681c2720f62182e57237b1cfefc384235f0e1
This commit is contained in:
bigbiff
2019-12-22 16:05:12 -05:00
parent 2923defaea
commit d331705daa

View File

@@ -524,7 +524,7 @@ void TWFunc::Copy_Log(string Source, string Destination) {
destLogBuffer.append(destFileBuffer);
}
} else if (Path_Exists(uncompressedLog)) {
std::ifstream uncompressedIfs(uncompressedLog);
std::ifstream uncompressedIfs(uncompressedLog.c_str());
std::stringstream uncompressedSS;
uncompressedSS << uncompressedIfs.rdbuf();
uncompressedIfs.close();
@@ -533,7 +533,7 @@ void TWFunc::Copy_Log(string Source, string Destination) {
std::remove(uncompressedLog.c_str());
}
std::ifstream ifs(Source);
std::ifstream ifs(Source.c_str());
std::stringstream ss;
ss << ifs.rdbuf();
std::string srcLogBuffer(ss.str());
@@ -759,8 +759,8 @@ int TWFunc::copy_file(string src, string dst, int mode) {
LOGINFO("Unable to find source file %s\n", src.c_str());
return -1;
}
std::ifstream srcfile(src, ios::binary);
std::ofstream dstfile(dst, ios::binary);
std::ifstream srcfile(src.c_str(), ios::binary);
std::ofstream dstfile(dst.c_str(), ios::binary);
dstfile << srcfile.rdbuf();
if (!dstfile.bad()) {
LOGINFO("Copied file %s to %s\n", src.c_str(), dst.c_str());