[vlc-devel] commit: Don't create an unused variable per action ( Rémi Denis-Courmont )
git version control
git at videolan.org
Thu Mar 27 21:42:51 CET 2008
vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Thu Mar 27 22:42:34 2008 +0200| [ac434f31ff448cd60c72ac101556328297792999]
Don't create an unused variable per action
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ac434f31ff448cd60c72ac101556328297792999
---
modules/control/hotkeys.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
index 3ffd4cc..8797096 100644
--- a/modules/control/hotkeys.c
+++ b/modules/control/hotkeys.c
@@ -135,19 +135,16 @@ static void Close( vlc_object_t *p_this )
static void Run( intf_thread_t *p_intf )
{
vout_thread_t *p_vout = NULL;
- struct hotkey *p_hotkeys = p_intf->p_libvlc->p_hotkeys;
vlc_value_t val;
int i;
playlist_t *p_playlist = pl_Yield( p_intf );
/* Initialize hotkey structure */
- for( i = 0; p_hotkeys[i].psz_action != NULL; i++ )
+ for( struct hotkey *p_hotkey = p_intf->p_libvlc->p_hotkeys;
+ p_hotkey->psz_action != NULL;
+ p_hotkey++ )
{
- var_Create( p_intf->p_libvlc, p_hotkeys[i].psz_action,
- VLC_VAR_HOTKEY | VLC_VAR_DOINHERIT );
-
- var_Get( p_intf->p_libvlc, p_hotkeys[i].psz_action, &val );
- var_Set( p_intf->p_libvlc, p_hotkeys[i].psz_action, val );
+ p_hotkey->i_key = config_GetInt( p_intf, p_hotkey->psz_action );
}
for( ;; )
More information about the vlc-devel
mailing list