| 1636 | } |
| 1637 | |
| 1638 | ClusterSetIndex TxGraphImpl::InsertCluster(int level, std::unique_ptr<Cluster>&& cluster, QualityLevel quality) noexcept |
| 1639 | { |
| 1640 | // Cannot insert with quality level NONE (as that would mean not inserted). |
| 1641 | Assume(quality != QualityLevel::NONE); |
| 1642 | // The passed-in Cluster must not currently be in the TxGraphImpl. |
| 1643 | Assume(cluster->m_quality == QualityLevel::NONE); |
| 1644 | |
| 1645 | // Append it at the end of the relevant TxGraphImpl::m_cluster. |
| 1646 | auto& clusterset = GetClusterSet(level); |
| 1647 | auto& quality_clusters = clusterset.m_clusters[int(quality)]; |
| 1648 | ClusterSetIndex ret = quality_clusters.size(); |
| 1649 | cluster->m_quality = quality; |
| 1650 | cluster->m_setindex = ret; |
| 1651 | quality_clusters.push_back(std::move(cluster)); |
| 1652 | return ret; |
| 1653 | } |
| 1654 | |
| 1655 | void TxGraphImpl::SetClusterQuality(int level, QualityLevel old_quality, ClusterSetIndex old_index, QualityLevel new_quality) noexcept |
| 1656 | { |
no test coverage detected