From: SUTER Frederic Date: Tue, 14 Sep 2021 07:38:18 +0000 (+0200) Subject: type change + rename function X-Git-Tag: v3.29~81 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/d110d32a9926773fafa66b4fda789e0b822f3133 type change + rename function --- diff --git a/examples/cpp/engine-filtering/s4u-engine-filtering.cpp b/examples/cpp/engine-filtering/s4u-engine-filtering.cpp index ac510a6802..a57ba54049 100644 --- a/examples/cpp/engine-filtering/s4u-engine-filtering.cpp +++ b/examples/cpp/engine-filtering/s4u-engine-filtering.cpp @@ -49,7 +49,7 @@ public: bool operator()(simgrid::s4u::Host* host) { return host->get_pstate() != host_list.at(host); } - double get_old_speed(simgrid::s4u::Host* host) { return host_list.at(host); } + unsigned long get_old_speed_state(simgrid::s4u::Host* host) { return host_list.at(host); } }; } int main(int argc, char* argv[]) @@ -81,7 +81,7 @@ int main(int argc, char* argv[]) for (auto& host : list) XBT_INFO("The following hosts changed their frequency: %s (from %.1ff to %.1ff)", host->get_cname(), - host->get_pstate_speed(filter.get_old_speed(host)), host->get_speed()); + host->get_pstate_speed(filter.get_old_speed_state(host)), host->get_speed()); /* You can also just use any regular function (namespaced on need) to filter */ list = e.get_filtered_hosts(filter::filter_speed_more_than_50Mf);