From a64805bd3585268ae5531f1eb995e0db4761c5d5 Mon Sep 17 00:00:00 2001 From: Username404 Date: Tue, 5 Oct 2021 20:11:07 +0200 Subject: [PATCH] Use the constant iterators from the files set in main.cpp --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 78e0f10..a3b5c36 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -42,7 +42,7 @@ int main(int argc, char* argv[]) { if (!files.empty()) { vector>>> Units(files.size()); const launch& Policy = not parallel ? launch::deferred : launch::async; - transform(files.begin(), files.end(), Units.begin(), [&Policy, &compile](const string_view& fileName){ + transform(files.cbegin(), files.cend(), Units.begin(), [&Policy, &compile](const string_view& fileName){ return async(Policy, [&fileName, &compile]() { pair> resultingPair; try {