From 6bb1f0df2b9c7582a686f09681b91d185e2eb4f2 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 7 Jun 2016 12:37:43 -0400 Subject: more c++11/c++14 features - use std::move instead of std::swap - use assignment instead of memcpy - wrap operations in WaitOperationComplete (eh, not really c++11) - prefer unique_ptr assignment instead of reset --- pulse.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'pulse.h') diff --git a/pulse.h b/pulse.h index 3bfd4e6..f3db0d5 100644 --- a/pulse.h +++ b/pulse.h @@ -228,10 +228,11 @@ class PulseClient { balance_range_ = { min, max }; } - void EnableNotifications(Notifier* notifier); + void SetNotifier(std::unique_ptr notifier); private: - void mainloop_iterate(pa_operation* op); + void WaitOperationComplete(pa_operation* op); + template T* find_fuzzy(std::vector& haystack, const std::string& needle); void populate_server_info(); -- cgit v1.2.3