fixup! Traverse object tree

This commit is contained in:
Kamil Śliwak 2023-08-25 15:52:06 +02:00
parent 3b99f598ca
commit 75d34815bf

View File

@ -197,12 +197,11 @@ std::shared_ptr<Object> Object::objectAt(std::shared_ptr<Object> const& _object,
{
std::shared_ptr<Object> object = nullptr;
traverseObjectTree(_object.get(), YulString(_qualifiedName), [&](Object const* _obj) -> bool {
if (_qualifiedName.empty() || _qualifiedName == _obj->name.str())
{
if (!_qualifiedName.empty() && _qualifiedName != _obj->name.str())
return false;
object = make_shared<Object>(*_obj);
return true;
}
return false;
});
return object;