From 8c4adfd752aa25a4d6d49db870f88287858bc5fc Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 11 Jan 2021 17:39:57 -0800 Subject: Use a span instead of passing a vector by reference --- alc/backends/pulseaudio.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/alc/backends/pulseaudio.cpp b/alc/backends/pulseaudio.cpp index 135e3138..1b727335 100644 --- a/alc/backends/pulseaudio.cpp +++ b/alc/backends/pulseaudio.cpp @@ -319,7 +319,7 @@ struct DevMap { std::string device_name; }; -bool checkName(const al::vector &list, const std::string &name) +bool checkName(const al::span list, const std::string &name) { auto match_name = [&name](const DevMap &entry) -> bool { return entry.name == name; }; return std::find_if(list.cbegin(), list.cend(), match_name) != list.cend(); @@ -611,8 +611,8 @@ void PulseMainloop::probePlaybackDevices() std::unique_lock plock{mMutex}; context = connectContext(plock); - pa_operation *op{pa_context_get_sink_info_by_name(context, - nullptr, &deviceSinkCallbackC, this)}; + pa_operation *op{pa_context_get_sink_info_by_name(context, nullptr, + &deviceSinkCallbackC, this)}; waitForOperation(op, plock); op = pa_context_get_sink_info_list(context, &deviceSinkCallbackC, this); @@ -638,8 +638,8 @@ void PulseMainloop::probeCaptureDevices() std::unique_lock plock{mMutex}; context = connectContext(plock); - pa_operation *op{pa_context_get_source_info_by_name(context, - nullptr, &deviceSourceCallbackC, this)}; + pa_operation *op{pa_context_get_source_info_by_name(context, nullptr, + &deviceSourceCallbackC, this)}; waitForOperation(op, plock); op = pa_context_get_source_info_list(context, &deviceSourceCallbackC, this); -- cgit v1.2.3