| 65 | } |
| 66 | |
| 67 | void SigNode::CopyLinksPass2(std::map<LinkTag, Link>* link_map) { |
| 68 | for (auto& entry : *link_map) { |
| 69 | Link* hl_entry_ptr = &hash_to_link_[entry.second.unique_hash]; |
| 70 | // In case of a conflict, rehash. This should almost never happen. |
| 71 | // Because the order of iteration is predictable, the rehashed values |
| 72 | // will also be predictable. |
| 73 | while (!hl_entry_ptr->peers.empty()) { |
| 74 | CombineHash(1, &entry.second.unique_hash); |
| 75 | hl_entry_ptr = &hash_to_link_[entry.second.unique_hash]; |
| 76 | } |
| 77 | |
| 78 | for (const auto& peer : entry.second.peers) { |
| 79 | hashed_peers_.emplace_back(HashedPeer(entry.second.unique_hash, peer)); |
| 80 | } |
| 81 | |
| 82 | hl_entry_ptr->tag = entry.second.tag; |
| 83 | hl_entry_ptr->unique_hash = entry.second.unique_hash; |
| 84 | hl_entry_ptr->peers.swap(entry.second.peers); |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | void SigNode::ComputeTopoHash0() { |
| 89 | topo_hash_.clear(); |
nothing calls this directly
no test coverage detected