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:
Username404-59 2025-01-01 01:06:51 +01:00
parent 888c75a31e
commit fa874ef0d2
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 8 additions and 8 deletions

View File

@ -24,18 +24,18 @@ private:
unordered_task_map getTaskMapInstance() final { // TODO Include line in error messages
using namespace StandardComponents;
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 (pointer->getId() != typeid(Reference)) {
try {
return dynamic_cast<NamedIdentifier<true>&>(*pointer).name == parseComponent.name;
} catch (const bad_cast&) {
return false;
} catch (const bad_cast&) {};
}
return false;
})) { error(parseComponent.name + " has already been defined previously"); }
),
share_task(Reference, Function),
share_task(Reference, Class),
share_task(Reference, Define<true>),
share_task(Function, Class),
share_task(Function, Define<true>),
};
};
};