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

@@ -29,7 +29,7 @@ Partition::Partition(Instance &_instance,
unsigned buffer_chunks,
unsigned buffered_before_play)
:instance(_instance),
global_events(instance.event_loop, *this, &Partition::OnGlobalEvent),
global_events(instance.event_loop, BIND_THIS_METHOD(OnGlobalEvent)),
playlist(max_length, *this),
outputs(*this),
pc(*this, outputs, buffer_chunks, buffered_before_play)