Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
added support for test s4u-network-ns3-wifi
[simgrid.git] / examples / s4u / engine-filtering / s4u-engine-filtering.cpp
index 639e1edc886340d8673320ce482415e38bc584fe..d34e21f775f424056c50ed67cbeadd50639be292 100644 (file)
@@ -29,7 +29,7 @@ static bool filter_speed_more_than_50Mf(const simgrid::s4u::Host* host)
  */
 class SingleCore {
 public:
-  bool operator()(const simgrid::s4u::Host* host) { return host->get_core_count() == 1; }
+  bool operator()(const simgrid::s4u::Host* host) const { return host->get_core_count() == 1; }
 };
 
 /* This functor is a bit more complex, as it saves the current state when created.
@@ -39,7 +39,7 @@ class FrequencyChanged {
   std::map<simgrid::s4u::Host*, int> host_list;
 
 public:
-  explicit FrequencyChanged(simgrid::s4u::Engine& e)
+  explicit FrequencyChanged(const simgrid::s4u::Engine& e)
   {
     std::vector<simgrid::s4u::Host*> list = e.get_all_hosts();
     for (auto& host : list) {