aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-09-16 07:16:31 -0700
committerChris Robinson <[email protected]>2019-09-16 07:16:31 -0700
commitbf2c865d3953370ccf9d56e7a5dc6d2d4c587be1 (patch)
treebf9dd4ec305dfc61dd5d899d883453e94f0612f3 /alc/backends
parente16e2269b6a18c960a25d58f43ffad5ed408bee9 (diff)
Clean up some more shadowing warnings
Diffstat (limited to 'alc/backends')
-rw-r--r--alc/backends/pulseaudio.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/alc/backends/pulseaudio.cpp b/alc/backends/pulseaudio.cpp
index e9997013..4d3b34d9 100644
--- a/alc/backends/pulseaudio.cpp
+++ b/alc/backends/pulseaudio.cpp
@@ -447,10 +447,8 @@ struct DevMap {
bool checkName(const al::vector<DevMap> &list, const std::string &name)
{
- return std::find_if(list.cbegin(), list.cend(),
- [&name](const DevMap &entry) -> bool
- { return entry.name == name; }
- ) != list.cend();
+ auto match_name = [&name](const DevMap &entry) -> bool { return entry.name == name; };
+ return std::find_if(list.cbegin(), list.cend(), match_name) != list.cend();
}
al::vector<DevMap> PlaybackDevices;
@@ -756,7 +754,7 @@ void PulsePlayback::sinkInfoCallbackC(pa_context *context, const pa_sink_info *i
void PulsePlayback::sinkInfoCallback(pa_context*, const pa_sink_info *info, int eol)
{
struct ChannelMap {
- DevFmtChannels chans;
+ DevFmtChannels fmt;
pa_channel_map map;
};
static constexpr std::array<ChannelMap,7> chanmaps{{
@@ -775,14 +773,14 @@ void PulsePlayback::sinkInfoCallback(pa_context*, const pa_sink_info *info, int
return;
}
- auto chanmap = std::find_if(chanmaps.cbegin(), chanmaps.cend(),
+ auto chaniter = std::find_if(chanmaps.cbegin(), chanmaps.cend(),
[info](const ChannelMap &chanmap) -> bool
{ return pa_channel_map_superset(&info->channel_map, &chanmap.map); }
);
- if(chanmap != chanmaps.cend())
+ if(chaniter != chanmaps.cend())
{
if(!mDevice->Flags.get<ChannelsRequest>())
- mDevice->FmtChans = chanmap->chans;
+ mDevice->FmtChans = chaniter->fmt;
}
else
{