util/BindMethod: new utility class for callbacks

Replaces the old BoundMethod template.
This commit is contained in:
Max Kellermann
2016-06-17 17:00:05 +02:00
parent bdd0c3686d
commit 863f4d8366
8 changed files with 206 additions and 92 deletions

View File

@@ -65,7 +65,7 @@ struct Instance final
public NeighborListener
#endif
{
CallbackMaskMonitor<Instance> idle_monitor;
MaskMonitor idle_monitor;
#ifdef ENABLE_NEIGHBOR_PLUGINS
NeighborGlue *neighbors;
@@ -90,7 +90,7 @@ struct Instance final
StateFile *state_file;
Instance()
:idle_monitor(event_loop, *this, &Instance::OnIdle) {}
:idle_monitor(event_loop, BIND_THIS_METHOD(OnIdle)) {}
/**
* Initiate shutdown. Wrapper for EventLoop::Break().