Rename _qualifiedPath to _qualifiedName

This commit is contained in:
r0qs 2023-08-03 20:27:41 +02:00
parent 9b330b9680
commit 5f934346d1
No known key found for this signature in database
GPG Key ID: 61503DBA6667276C
2 changed files with 6 additions and 6 deletions

View File

@ -176,15 +176,15 @@ vector<size_t> Object::pathToSubObject(YulString _qualifiedName) const
return path;
}
shared_ptr<Object> Object::objectAt(shared_ptr<Object> const& _object, string const& _qualifiedPath)
shared_ptr<Object> Object::objectAt(shared_ptr<Object> 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(

View File

@ -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<Object> objectAt(
std::shared_ptr<Object> const& _object,
std::string const& _qualifiedPath
std::string const& _qualifiedName
);
};