-/* Copyright (c) 2017-2020. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2017-2021. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
*/
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.
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) {