Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
37a24d9c
Commit
37a24d9c
authored
Feb 23, 2017
by
Thomas Guillem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dialog: use vlc_array_index_of_item
parent
aa395b66
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
15 deletions
+3
-15
src/interface/dialog.c
src/interface/dialog.c
+3
-15
No files found.
src/interface/dialog.c
View file @
37a24d9c
...
...
@@ -166,17 +166,6 @@ libvlc_InternalDialogInit(libvlc_int_t *p_libvlc)
return
VLC_SUCCESS
;
}
static
int
dialog_get_idx_locked
(
vlc_dialog_provider
*
p_provider
,
vlc_dialog_id
*
p_id
)
{
for
(
size_t
i
=
0
;
i
<
vlc_array_count
(
&
p_provider
->
dialog_array
);
++
i
)
{
if
(
p_id
==
vlc_array_item_at_index
(
&
p_provider
->
dialog_array
,
i
))
return
i
;
}
return
-
1
;
}
static
void
dialog_cancel_locked
(
vlc_dialog_provider
*
p_provider
,
vlc_dialog_id
*
p_id
)
{
...
...
@@ -212,10 +201,9 @@ dialog_add_locked(vlc_dialog_provider *p_provider, enum dialog_type i_type)
static
void
dialog_remove_locked
(
vlc_dialog_provider
*
p_provider
,
vlc_dialog_id
*
p_id
)
{
int
i_array_idx
=
dialog_get_idx_locked
(
p_provider
,
p_id
);
assert
(
i_array_idx
>=
0
);
vlc_array_remove
(
&
p_provider
->
dialog_array
,
i_array_idx
);
ssize_t
i_idx
=
vlc_array_index_of_item
(
&
p_provider
->
dialog_array
,
p_id
);
assert
(
i_idx
>=
0
);
vlc_array_remove
(
&
p_provider
->
dialog_array
,
i_idx
);
vlc_mutex_lock
(
&
p_id
->
lock
);
p_id
->
i_refcount
--
;
...
...
Write
Preview
Markdown
is supported
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