Use the constant iterators from the files set in main.cpp

This commit is contained in:
Username404 2021-10-05 20:11:07 +02:00
parent 20eff1d7b5
commit a64805bd35
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ int main(int argc, char* argv[]) {
if (!files.empty()) {
vector<future<pair<string, optional<Yerbacon::Exception>>>> 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<string, optional<Yerbacon::Exception>> resultingPair;
try {