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
4461bd9e
Commit
4461bd9e
authored
Aug 13, 2013
by
Tristan Matthews
Browse files
* #28351: videov4l2list: use range-based for loops
parent
9f73d64f
Changes
1
Hide whitespace changes
Inline
Side-by-side
daemon/src/video/video_v4l2_list.cpp
View file @
4461bd9e
...
...
@@ -195,8 +195,8 @@ namespace {
void
giveUniqueName
(
VideoV4l2Device
&
dev
,
const
vector
<
VideoV4l2Device
>
&
devices
)
{
start:
for
(
size_t
i
=
0
;
i
<
devices
.
size
();
++
i
)
{
if
(
dev
.
name
==
devices
[
i
]
.
name
)
{
for
(
auto
&
iter
:
devices
)
{
if
(
dev
.
name
==
iter
.
name
)
{
size_t
sharp
;
int
num
=
getNumber
(
dev
.
name
,
&
sharp
);
if
(
num
<
0
)
// not numbered
...
...
@@ -288,7 +288,7 @@ void VideoV4l2ListThread::delDevice(const string &node)
{
ScopedLock
lock
(
mutex_
);
for
(
std
::
vector
<
VideoV4l2Device
>::
iter
ato
r
itr
=
devices_
.
begin
();
itr
!=
devices_
.
end
();
++
itr
)
{
for
(
a
u
to
itr
=
devices_
.
begin
();
itr
!=
devices_
.
end
();
++
itr
)
{
if
(
itr
->
device
==
node
)
{
devices_
.
erase
(
itr
);
Manager
::
instance
().
getVideoControls
()
->
deviceEvent
();
...
...
@@ -352,8 +352,8 @@ vector<string> VideoV4l2ListThread::getDeviceList()
ScopedLock
lock
(
mutex_
);
vector
<
string
>
v
;
for
(
std
::
vector
<
VideoV4l2Device
>::
iterator
itr
=
devices_
.
begin
();
itr
!=
devices_
.
end
();
++
itr
)
v
.
push_back
(
itr
->
name
.
empty
()
?
itr
->
device
:
itr
->
name
);
for
(
const
auto
&
itr
:
devices_
)
v
.
push_back
(
itr
.
name
.
empty
()
?
itr
.
device
:
itr
.
name
);
return
v
;
}
...
...
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