From d331705daa073d36e1f5dc445bd3eccf49987019 Mon Sep 17 00:00:00 2001 From: bigbiff Date: Sun, 22 Dec 2019 16:05:12 -0500 Subject: [PATCH] android-5.1: use char constructor for default on c++ streams Change-Id: I4be681c2720f62182e57237b1cfefc384235f0e1 --- twrp-functions.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/twrp-functions.cpp b/twrp-functions.cpp index 4386ff6f..a3e5a073 100755 --- a/twrp-functions.cpp +++ b/twrp-functions.cpp @@ -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());