aboutsummaryrefslogtreecommitdiff
path: root/src/moonp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/moonp.cpp')
-rw-r--r--src/moonp.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/moonp.cpp b/src/moonp.cpp
index ade1a1b..8026d50 100644
--- a/src/moonp.cpp
+++ b/src/moonp.cpp
@@ -81,10 +81,10 @@ int main(int narg, const char** args) {
81 if (!targetPath.empty() && targetPath.back() != '/' && targetPath.back() != '\\') { 81 if (!targetPath.empty() && targetPath.back() != '/' && targetPath.back() != '\\') {
82 targetPath.append("/"); 82 targetPath.append("/");
83 } 83 }
84 std::list<std::future<std::result_of_t<std::decay_t<int()>()>>> results; 84 std::list<std::future<int>> results;
85 for (const auto& file : files) { 85 for (const auto& file : files) {
86 auto task = std::async(std::launch::async, [=]() { 86 auto task = std::async(std::launch::async, [=]() {
87 std::ifstream input(file, input.in); 87 std::ifstream input(file, std::ios::in);
88 if (input) { 88 if (input) {
89 std::string s( 89 std::string s(
90 (std::istreambuf_iterator<char>(input)), 90 (std::istreambuf_iterator<char>(input)),
@@ -135,7 +135,7 @@ int main(int narg, const char** args) {
135 } else { 135 } else {
136 targetFile = resultFile; 136 targetFile = resultFile;
137 } 137 }
138 std::ofstream output(targetFile, output.trunc | output.out); 138 std::ofstream output(targetFile, std::ios::trunc | std::ios::out);
139 if (output) { 139 if (output) {
140 const auto& codes = std::get<0>(result); 140 const auto& codes = std::get<0>(result);
141 output.write(codes.c_str(), codes.size()); 141 output.write(codes.c_str(), codes.size());