Commit 54b9bea2 authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/wxwindows: do not use INSERT_ELEM in c++ code.

parent d388fc44
...@@ -1391,12 +1391,22 @@ wxMenu *Playlist::SDMenu() ...@@ -1391,12 +1391,22 @@ wxMenu *Playlist::SDMenu()
{ {
module_t * p_parser = (module_t *)p_list->p_values[i_index].p_object ; module_t * p_parser = (module_t *)p_list->p_values[i_index].p_object ;
if( !strcmp( p_parser->psz_capability, "services_discovery" ) )
i_number++;
}
if( i_number ) pp_sds = (char **)malloc( i_number * sizeof(void *) );
i_number = 0;
for( int i_index = 0; i_index < p_list->i_count; i_index++ )
{
module_t * p_parser = (module_t *)p_list->p_values[i_index].p_object ;
if( !strcmp( p_parser->psz_capability, "services_discovery" ) ) if( !strcmp( p_parser->psz_capability, "services_discovery" ) )
{ {
p_sd_menu->AppendCheckItem( FirstSD_Event + i_number , p_sd_menu->AppendCheckItem( FirstSD_Event + i_number ,
wxU( p_parser->psz_longname ? p_parser->psz_longname : wxU( p_parser->psz_longname ? p_parser->psz_longname :
( p_parser->psz_shortname ? (p_parser->psz_shortname ?
p_parser->psz_shortname :p_parser->psz_object_name)) ); p_parser->psz_shortname : p_parser->psz_object_name) ) );
if( playlist_IsServicesDiscoveryLoaded( p_playlist, if( playlist_IsServicesDiscoveryLoaded( p_playlist,
p_parser->psz_object_name ) ) p_parser->psz_object_name ) )
...@@ -1404,8 +1414,7 @@ wxMenu *Playlist::SDMenu() ...@@ -1404,8 +1414,7 @@ wxMenu *Playlist::SDMenu()
p_sd_menu->Check( FirstSD_Event + i_number, TRUE ); p_sd_menu->Check( FirstSD_Event + i_number, TRUE );
} }
INSERT_ELEM( (void**)pp_sds, i_number, i_number, pp_sds[i_number++] = p_parser->psz_object_name;
(void*)p_parser->psz_object_name );
} }
} }
vlc_list_release( p_list ); vlc_list_release( p_list );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment