diff options
author | Chris Robinson <[email protected]> | 2021-01-11 17:39:57 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2021-01-11 17:39:57 -0800 |
commit | 8c4adfd752aa25a4d6d49db870f88287858bc5fc (patch) | |
tree | a9cea70f8efe44b1446687e8168767f61a19f2d8 | |
parent | 1f01311ee3901c31d153a67543c0cbf1475e6e47 (diff) |
Use a span instead of passing a vector by reference
-rw-r--r-- | alc/backends/pulseaudio.cpp | 10 |
1 files 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<DevMap> &list, const std::string &name) +bool checkName(const al::span<const DevMap> 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<std::mutex> 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<std::mutex> 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); |