mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Rename _qualifiedPath to _qualifiedName
This commit is contained in:
parent
9b330b9680
commit
5f934346d1
@ -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(
|
||||
|
@ -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
|
||||
);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user