Target.hpp: Don't return a reference to a static thread-local map in the Target::getTaskMapInstance function
It only worked properly with the "--parallel" flag Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
764f3287ff
commit
f348dc985f
|
@ -124,10 +124,10 @@ protected:
|
||||||
string separator;
|
string separator;
|
||||||
static constexpr const char* indentation = " ";
|
static constexpr const char* indentation = " ";
|
||||||
public:
|
public:
|
||||||
const unordered_task_map& getTaskMapInstance() {
|
unordered_task_map getTaskMapInstance() {
|
||||||
static thread_local unordered_task_map staticMap = getTaskMap();
|
unordered_task_map fullMap = getTaskMap();
|
||||||
// Default / Shared tasks:
|
// Default / Shared tasks:
|
||||||
staticMap.merge(unordered_task_map({
|
fullMap.merge(unordered_task_map({
|
||||||
make_task(ParseTree, transpileTree(parseComponent);),
|
make_task(ParseTree, transpileTree(parseComponent);),
|
||||||
make_task(StandardComponents::Reference, output << parseComponent.name;),
|
make_task(StandardComponents::Reference, output << parseComponent.name;),
|
||||||
make_task(StandardComponents::Call,
|
make_task(StandardComponents::Call,
|
||||||
|
@ -139,7 +139,7 @@ public:
|
||||||
),
|
),
|
||||||
make_task(StandardComponents::types::Integer, output << setprecision(parseComponent.precision) << fixed << parseComponent.value;)
|
make_task(StandardComponents::types::Integer, output << setprecision(parseComponent.precision) << fixed << parseComponent.value;)
|
||||||
}));
|
}));
|
||||||
return staticMap;
|
return fullMap;
|
||||||
};
|
};
|
||||||
static unique_ptr<Target> forName(string_view name, bool newLines);
|
static unique_ptr<Target> forName(string_view name, bool newLines);
|
||||||
string transpileWithTree(const ParseTree& tree) {
|
string transpileWithTree(const ParseTree& tree) {
|
||||||
|
|
Loading…
Reference in New Issue