@@ -296,20 +296,17 @@ class Topology {
296
296
}
297
297
298
298
// copy all the far-end non-cyclic node, in reverse order
299
- // NOLINTNEXTLINE(modernize-use-ranges) // waiting for std::views
300
- std::copy_if (dfs_node_copy.crbegin (), dfs_node_copy.crend (), std::back_inserter (dfs_node),
301
- [this ](Idx x) { return node_status_[x] == -1 ; });
299
+ std::ranges::copy_if (std::views::reverse (dfs_node_copy), std::back_inserter (dfs_node),
300
+ [this ](Idx x) { return node_status_[x] == -1 ; });
302
301
303
302
// copy all cyclic node
304
303
std::vector<Idx> cyclic_node;
305
- // NOLINTNEXTLINE(modernize-use-ranges) // waiting for std::views
306
- std::copy_if (dfs_node_copy.cbegin (), dfs_node_copy.cend (), std::back_inserter (cyclic_node),
307
- [this ](Idx x) { return node_status_[x] == -2 ; });
304
+ std::ranges::copy_if (dfs_node_copy, std::back_inserter (cyclic_node),
305
+ [this ](Idx x) { return node_status_[x] == -2 ; });
308
306
309
307
// reorder does not make sense if number of cyclic nodes in a sub graph is smaller than 4
310
308
if (cyclic_node.size () < 4 ) {
311
- // NOLINTNEXTLINE(modernize-use-ranges) // waiting for std::views
312
- std::copy (cyclic_node.crbegin (), cyclic_node.crend (), std::back_inserter (dfs_node));
309
+ std::ranges::copy (std::views::reverse (cyclic_node), std::back_inserter (dfs_node));
313
310
return fill_in;
314
311
}
315
312
0 commit comments