| 214 | } |
| 215 | |
| 216 | void Object::collectSourceIndices(std::map<std::string, unsigned>& _indices) const |
| 217 | { |
| 218 | if (debugData && debugData->sourceNames.has_value()) |
| 219 | for (auto const& [sourceIndex, sourceName]: debugData->sourceNames.value()) |
| 220 | { |
| 221 | solAssert(_indices.count(*sourceName) == 0 || _indices[*sourceName] == sourceIndex); |
| 222 | _indices[*sourceName] = sourceIndex; |
| 223 | } |
| 224 | for (std::shared_ptr<ObjectNode> const& subNode: subObjects) |
| 225 | if (auto subObject = dynamic_cast<Object*>(subNode.get())) |
| 226 | subObject->collectSourceIndices(_indices); |
| 227 | } |
| 228 | |
| 229 | bool Object::hasContiguousSourceIndices() const |
| 230 | { |
no test coverage detected