Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
53164722
Commit
53164722
authored
Aug 14, 2013
by
Tristan Matthews
Browse files
* #28351: audiocodecfactory: use range-based for loops
parent
83e5b3a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
daemon/src/audio/alsa/alsalayer.cpp
View file @
53164722
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment