mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
fixup! getObject -> Object::objectAt
This commit is contained in:
parent
75d34815bf
commit
f34171f806
@ -193,11 +193,11 @@ vector<size_t> Object::pathToSubObject(YulString _qualifiedName) const
|
||||
return path;
|
||||
}
|
||||
|
||||
std::shared_ptr<Object> Object::objectAt(std::shared_ptr<Object> const& _object, string const& _qualifiedName)
|
||||
std::shared_ptr<Object> Object::objectAt(std::shared_ptr<Object> const& _object, YulString _qualifiedName)
|
||||
{
|
||||
std::shared_ptr<Object> object = nullptr;
|
||||
traverseObjectTree(_object.get(), YulString(_qualifiedName), [&](Object const* _obj) -> bool {
|
||||
if (!_qualifiedName.empty() && _qualifiedName != _obj->name.str())
|
||||
traverseObjectTree(_object.get(), _qualifiedName, [&](Object const* _obj) -> bool {
|
||||
if (!_qualifiedName.empty() && _qualifiedName != _obj->name)
|
||||
return false;
|
||||
|
||||
object = make_shared<Object>(*_obj);
|
||||
|
@ -142,7 +142,7 @@ public:
|
||||
/// @returns a shared_ptr to the Object or a nullptr if it was not found.
|
||||
static std::shared_ptr<Object> objectAt(
|
||||
std::shared_ptr<Object> const& _object,
|
||||
std::string const& _qualifiedName
|
||||
YulString _qualifiedName
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -253,7 +253,7 @@ public:
|
||||
{
|
||||
if (!m_inputIsCodeBlock)
|
||||
{
|
||||
shared_ptr<Object> subObject = Object::objectAt(m_object, _objectPath);
|
||||
shared_ptr<Object> subObject = Object::objectAt(m_object, YulString(_objectPath));
|
||||
|
||||
if (subObject == nullptr)
|
||||
solThrow(Exception, "Assembly object not found.");
|
||||
|
Loading…
Reference in New Issue
Block a user