MCPcopy Create free account
hub / github.com/argotorg/solidity / fullDecomposition

Method fullDecomposition

libsolidity/ast/Types.cpp:1519–1532  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1517}
1518
1519std::vector<Type const*> CompositeType::fullDecomposition() const
1520{
1521 std::vector<Type const*> res = {this};
1522 std::unordered_set<std::string> seen = {richIdentifier()};
1523 for (size_t k = 0; k < res.size(); ++k)
1524 if (auto composite = dynamic_cast<CompositeType const*>(res[k]))
1525 for (Type const* next: composite->decomposition())
1526 if (seen.count(next->richIdentifier()) == 0)
1527 {
1528 seen.insert(next->richIdentifier());
1529 res.push_back(next);
1530 }
1531 return res;
1532}
1533
1534Type const* ReferenceType::withLocation(DataLocation _location, bool _isPointer) const
1535{

Callers 1

visitMethod · 0.80

Calls 6

richIdentifierFunction · 0.85
insertMethod · 0.80
sizeMethod · 0.45
decompositionMethod · 0.45
countMethod · 0.45
richIdentifierMethod · 0.45

Tested by

no test coverage detected