Skip to content

Commit 9bccbcd

Browse files
committed
mpl/rsz: reinstate c++20 usage
Signed-off-by: Matt Liberty <[email protected]>
1 parent 8d5bf8a commit 9bccbcd

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/mpl/src/clusterEngine.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1858,8 +1858,8 @@ bool ClusteringEngine::sameConnectionSignature(Cluster* a, Cluster* b) const
18581858
return false;
18591859
}
18601860

1861-
std::sort(a_neighbors.begin(), a_neighbors.end());
1862-
std::sort(b_neighbors.begin(), b_neighbors.end());
1861+
std::ranges::sort(a_neighbors);
1862+
std::ranges::sort(b_neighbors);
18631863

18641864
for (int i = 0; i < a_neighbors.size(); i++) {
18651865
if (a_neighbors[i] != b_neighbors[i]) {
@@ -1950,9 +1950,8 @@ Cluster* ClusteringEngine::findSingleWellFormedConnectedCluster(
19501950
}
19511951

19521952
if (strongConnection(target_cluster, candidate, &connection_weight)) {
1953-
auto small_child_found = std::find(small_clusters_id_list.begin(),
1954-
small_clusters_id_list.end(),
1955-
cluster_id);
1953+
auto small_child_found
1954+
= std::ranges::find(small_clusters_id_list, cluster_id);
19561955

19571956
// A small child is not well-formed, so we avoid them.
19581957
if (small_child_found == small_clusters_id_list.end()) {

src/rsz/src/RepairDesign.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ void RepairDesign::repairDesign(
352352
true /* check_fanout */,
353353
max_length,
354354
true /* resize_driver */,
355-
drvr_with_load_slew_viol.count(drvr)
355+
drvr_with_load_slew_viol.contains(drvr)
356356
? drvr_with_load_slew_viol.at(drvr)
357357
: nullptr,
358358
repaired_net_count,

0 commit comments

Comments
 (0)