Skip to content

Commit 56cf5f8

Browse files
committed
mpl: adapt code to c++20 style
Signed-off-by: Arthur Koucher <[email protected]>
1 parent f2e98ed commit 56cf5f8

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
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()) {

0 commit comments

Comments
 (0)