clang-tidy: Enable modernize-avoid-bind check
The check finds uses of std::bind and boost::bind and replaces them
with lambdas.
Lambdas will use value-capture unless reference capture is explicitly
requested with std::ref or boost::ref.
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I4491650a46eaab1588474b26efc622e89232ef02
diff --git a/fault-monitor/operational-status-monitor.hpp b/fault-monitor/operational-status-monitor.hpp
index 3b67edb..6bd2efc 100644
--- a/fault-monitor/operational-status-monitor.hpp
+++ b/fault-monitor/operational-status-monitor.hpp
@@ -47,8 +47,7 @@
"sender='xyz.openbmc_project.Inventory.Manager', "
"arg0namespace='xyz.openbmc_project.State.Decorator."
"OperationalStatus'",
- std::bind(std::mem_fn(&Monitor::matchHandler), this,
- std::placeholders::_1))
+ [this](sdbusplus::message_t& m) { matchHandler(m); })
{}