mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
* #28351: audiocodecfactory: use range-based for loops
This commit is contained in:
@ -557,9 +557,8 @@ getValues(const std::vector<HwIDPair> &deviceMap)
|
||||
{
|
||||
std::vector<std::string> audioDeviceList;
|
||||
|
||||
for (std::vector<HwIDPair>::const_iterator iter = deviceMap.begin();
|
||||
iter != deviceMap.end(); ++iter)
|
||||
audioDeviceList.push_back(iter->second);
|
||||
for (const auto &dev : deviceMap)
|
||||
audioDeviceList.push_back(dev.second);
|
||||
|
||||
return audioDeviceList;
|
||||
}
|
||||
@ -659,9 +658,9 @@ AlsaLayer::getAudioDeviceIndex(const std::string &description) const
|
||||
audioDeviceIndexMap.insert(audioDeviceIndexMap.end(), captureDevice.begin(), captureDevice.end());
|
||||
audioDeviceIndexMap.insert(audioDeviceIndexMap.end(), playbackDevice.begin(), playbackDevice.end());
|
||||
|
||||
for (std::vector<HwIDPair>::const_iterator iter = audioDeviceIndexMap.begin(); iter != audioDeviceIndexMap.end(); ++iter)
|
||||
if (iter->second == description)
|
||||
return iter->first;
|
||||
for (const auto &dev : audioDeviceIndexMap)
|
||||
if (dev.second == description)
|
||||
return dev.first;
|
||||
|
||||
// else return the default one
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user