clang-tidy: Enable readability-convert-member-functions-to-static
This check finds non-static member functions that can be made
static because the functions don’t use this.
This check also triggers readability-static-accessed-through
-instance check as we are trying to access a static member
function through an instance.
Change-Id: Ia0867db019db8e40e710bdd4025e030061f7a992
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
diff --git a/sync_manager_main.cpp b/sync_manager_main.cpp
index 758abcf..8f70fe4 100644
--- a/sync_manager_main.cpp
+++ b/sync_manager_main.cpp
@@ -22,12 +22,10 @@
try
{
- phosphor::software::manager::Sync syncManager;
-
using namespace phosphor::software::manager;
- phosphor::software::manager::SyncWatch watch(
- *loop, std::bind(std::mem_fn(&Sync::processEntry), &syncManager,
- std::placeholders::_1, std::placeholders::_2));
+ auto syncCallback = std::bind(
+ &Sync::processEntry, std::placeholders::_1, std::placeholders::_2);
+ phosphor::software::manager::SyncWatch watch(*loop, syncCallback);
bus.attach_event(loop, SD_EVENT_PRIORITY_NORMAL);
sd_event_loop(loop);
}