Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Pass large objects by reference to const (Sonar).
[simgrid.git] / src / mc / explo / udpor / maximal_subsets_iterator.cpp
index 472855a..6c2dee3 100644 (file)
@@ -6,11 +6,12 @@
 
 namespace simgrid::mc::udpor {
 
-maximal_subsets_iterator::maximal_subsets_iterator(const EventSet& events, std::optional<node_filter_function> filter,
+maximal_subsets_iterator::maximal_subsets_iterator(const EventSet& events,
+                                                   const std::optional<node_filter_function>& filter,
                                                    std::optional<size_t> maximum_subset_size)
     : maximum_subset_size(maximum_subset_size), current_maximal_set({EventSet()})
 {
-  const auto candidate_ordering = events.get_topological_ordering_of_reverse_graph();
+  auto candidate_ordering = events.get_topological_ordering_of_reverse_graph();
   if (filter.has_value()) {
     // Only store the events in the ordering that "matter" to us
     std::copy_if(std::move_iterator(candidate_ordering.begin()), std::move_iterator(candidate_ordering.end()),
@@ -34,7 +35,7 @@ void maximal_subsets_iterator::increment()
   }
 
   const auto next_event_ref = [&]() {
-    if (!has_started_searching) {
+    if (not has_started_searching) {
       has_started_searching = true;
       return bookkeeper.find_next_candidate_event(topological_ordering.begin(), topological_ordering.end());
     } else {