diff --git a/libyul/Object.cpp b/libyul/Object.cpp index f19c513d4..02decdf95 100644 --- a/libyul/Object.cpp +++ b/libyul/Object.cpp @@ -176,15 +176,15 @@ vector Object::pathToSubObject(YulString _qualifiedName) const return path; } -shared_ptr Object::objectAt(shared_ptr const& _object, string const& _qualifiedPath) +shared_ptr Object::objectAt(shared_ptr const& _object, string const& _qualifiedName) { - if (_qualifiedPath.empty() || _qualifiedPath == _object->name.str()) + if (_qualifiedName.empty() || _qualifiedName == _object->name.str()) return _object; - if (!boost::algorithm::starts_with(_qualifiedPath, _object->name.str() + ".")) + if (!boost::algorithm::starts_with(_qualifiedName, _object->name.str() + ".")) return nullptr; - string const subObjectPath = _qualifiedPath.substr(_object->name.str().length() + 1); + string const subObjectPath = _qualifiedName.substr(_object->name.str().length() + 1); string const subObjectName = subObjectPath.substr(0, subObjectPath.find_first_of('.')); auto subObjectIt = ranges::find_if( diff --git a/libyul/Object.h b/libyul/Object.h index 2bbcf1bd7..fc824a785 100644 --- a/libyul/Object.h +++ b/libyul/Object.h @@ -130,11 +130,11 @@ public: /// @returns the name of the special metadata data object. static std::string metadataName() { return ".metadata"; } - /// Recursively searches for an Object at @param _qualifiedPath within @param _object. + /// Recursively searches for an Object at @param _qualifiedName within @param _object. /// @returns a shared_ptr to the Object or a nullptr if it was not found. static std::shared_ptr objectAt( std::shared_ptr const& _object, - std::string const& _qualifiedPath + std::string const& _qualifiedName ); };