treewide: Remove uses of bind
Bind is less compatible with function wrappers like function2 and more
terse to read.
Change-Id: I34474b71758db1ffee301729c585c4d555df2064
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/chassis_state_manager.hpp b/chassis_state_manager.hpp
index d12ad36..7e9c7b9 100644
--- a/chassis_state_manager.hpp
+++ b/chassis_state_manager.hpp
@@ -13,7 +13,6 @@
#include <chrono>
#include <filesystem>
-#include <functional>
namespace phosphor
{
@@ -54,11 +53,11 @@
sdbusRule::type::signal() + sdbusRule::member("JobRemoved") +
sdbusRule::path("/org/freedesktop/systemd1") +
sdbusRule::interface("org.freedesktop.systemd1.Manager"),
- std::bind(std::mem_fn(&Chassis::sysStateChange), this,
- std::placeholders::_1)),
- id(id), pohTimer(sdeventplus::Event::get_default(),
- std::bind(&Chassis::pohCallback, this),
- std::chrono::hours{1}, std::chrono::minutes{1})
+ [this](sdbusplus::message_t& m) { sysStateChange(m); }),
+ id(id),
+ pohTimer(
+ sdeventplus::Event::get_default(), [this](auto&) { pohCallback(); },
+ std::chrono::hours{1}, std::chrono::minutes{1})
{
subscribeToSystemdSignals();