Don't try to find duplicate references, this is stupid
Signed-off-by: Username404-59 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
888c75a31e
commit
fa874ef0d2
|
@ -24,18 +24,18 @@ private:
|
||||||
unordered_task_map getTaskMapInstance() final { // TODO Include line in error messages
|
unordered_task_map getTaskMapInstance() final { // TODO Include line in error messages
|
||||||
using namespace StandardComponents;
|
using namespace StandardComponents;
|
||||||
return {
|
return {
|
||||||
make_nonlocal_task(Reference,
|
make_nonlocal_task(Function,
|
||||||
if (index > 0 and any_of(parsedTree.cbegin(), parsedTree.cbegin() + index + 1, [&parseComponent](const component_ptr& pointer){
|
if (index > 0 and any_of(parsedTree.cbegin(), parsedTree.cbegin() + index + 1, [&parseComponent](const component_ptr& pointer){
|
||||||
try {
|
if (pointer->getId() != typeid(Reference)) {
|
||||||
return dynamic_cast<NamedIdentifier<true>&>(*pointer).name == parseComponent.name;
|
try {
|
||||||
} catch (const bad_cast&) {
|
return dynamic_cast<NamedIdentifier<true>&>(*pointer).name == parseComponent.name;
|
||||||
return false;
|
} catch (const bad_cast&) {};
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
})) { error(parseComponent.name + " has already been defined previously"); }
|
})) { error(parseComponent.name + " has already been defined previously"); }
|
||||||
),
|
),
|
||||||
share_task(Reference, Function),
|
share_task(Function, Class),
|
||||||
share_task(Reference, Class),
|
share_task(Function, Define<true>),
|
||||||
share_task(Reference, Define<true>),
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue