- auto governor = [&dvfs_governor, &daemon_proc]() {
- if (dvfs_governor == "conservative") {
- return std::unique_ptr<simgrid::plugin::dvfs::Governor>(
- new simgrid::plugin::dvfs::Conservative(daemon_proc->get_host()));
- } else if (dvfs_governor == "ondemand") {
- return std::unique_ptr<simgrid::plugin::dvfs::Governor>(
- new simgrid::plugin::dvfs::OnDemand(daemon_proc->get_host()));
- }
+ auto governor = [&dvfs_governor, &daemon_proc]() -> std::unique_ptr<simgrid::plugin::dvfs::Governor> {
+ if (dvfs_governor == "conservative")
+ return std::make_unique<simgrid::plugin::dvfs::Conservative>(daemon_proc->get_host());
+ if (dvfs_governor == "ondemand")
+ return std::make_unique<simgrid::plugin::dvfs::OnDemand>(daemon_proc->get_host());