Merge "android-5.1: use char constructor for default on c++ streams" into android-9.0

This commit is contained in:
bigbiff
2019-12-23 23:06:23 +00:00
committed by Gerrit Code Review
+4 -4
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());