Make the Policy local variable a reference in main.cpp, remove a useless #include directive and include Yerbacon.hpp before future.
This commit is contained in:
parent
c2a9c630ed
commit
604532dc34
|
@ -1,12 +1,11 @@
|
|||
#include <iostream>
|
||||
#include <experimental/array>
|
||||
#include <set>
|
||||
#include "headers/Yerbacon.hpp"
|
||||
#include <future>
|
||||
#include <sstream>
|
||||
using namespace std;
|
||||
|
||||
#include "headers/misc.hpp"
|
||||
#include "headers/Yerbacon.hpp"
|
||||
#include "headers/arguments.hpp"
|
||||
#include "headers/transpiler/Target.hpp"
|
||||
|
||||
|
@ -34,9 +33,9 @@ int main(int argc, char* argv[]) {
|
|||
if (!files.empty()) {
|
||||
const set<string_view> uniqueFiles(files.begin(), files.end());
|
||||
vector<future<string>> Units;
|
||||
const launch& Policy = not parallel ? launch::deferred : launch::async;
|
||||
for (string_view fileName: uniqueFiles) {
|
||||
if (fileName != "none") {
|
||||
const launch Policy = !parallel ? launch::deferred : launch::async;
|
||||
future<string> newAsync = async(Policy, [printResult, fileName, target]() mutable {
|
||||
const string transpiledString = transpile(parseString(getFileContent(fileName.data())), target);
|
||||
stringstream consoleOutput;
|
||||
|
|
Loading…
Reference in New Issue