[vlc-commits] variables: remove useless VLC_VAR_CHOICESCOUNT parameter

Rémi Denis-Courmont git at videolan.org
Sun Jun 10 12:10:58 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jun  9 13:07:17 2018 +0300| [c006da0514d2ee7364ea8a1c15ecc66029ca5b5f] | committer: Rémi Denis-Courmont

variables: remove useless VLC_VAR_CHOICESCOUNT parameter

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c006da0514d2ee7364ea8a1c15ecc66029ca5b5f
---

 include/vlc_variables.h            | 2 +-
 lib/media_player.c                 | 6 +++---
 modules/gui/macosx/VLCMainMenu.m   | 2 +-
 modules/gui/qt/input_manager.cpp   | 6 +++---
 modules/gui/qt/menus.cpp           | 2 +-
 modules/gui/skins2/src/vlcproc.cpp | 5 ++---
 src/input/es_out.c                 | 2 +-
 src/input/input.c                  | 2 +-
 src/input/var.c                    | 4 ++--
 9 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/include/vlc_variables.h b/include/vlc_variables.h
index 0be78c8023..034ebc0af6 100644
--- a/include/vlc_variables.h
+++ b/include/vlc_variables.h
@@ -667,7 +667,7 @@ VLC_USED
 static inline int var_CountChoices( vlc_object_t *p_obj, const char *psz_name )
 {
     vlc_value_t count;
-    if( var_Change( p_obj, psz_name, VLC_VAR_CHOICESCOUNT, &count, NULL ) )
+    if( var_Change( p_obj, psz_name, VLC_VAR_CHOICESCOUNT, &count ) )
         return 0;
     return count.i_int;
 }
diff --git a/lib/media_player.c b/lib/media_player.c
index 08c6c1ce6c..b98abc0599 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -1403,7 +1403,7 @@ int libvlc_media_player_get_chapter_count( libvlc_media_player_t *p_mi )
     if( !p_input_thread )
         return -1;
 
-    int i_ret = var_Change( p_input_thread, "chapter", VLC_VAR_CHOICESCOUNT, &val, NULL );
+    int i_ret = var_Change( p_input_thread, "chapter", VLC_VAR_CHOICESCOUNT, &val );
     vlc_object_release( p_input_thread );
 
     return i_ret == VLC_SUCCESS ? val.i_int : -1;
@@ -1422,7 +1422,7 @@ int libvlc_media_player_get_chapter_count_for_title(
     char psz_name[sizeof ("title ") + 3 * sizeof (int)];
     sprintf( psz_name, "title %2u", i_title );
 
-    int i_ret = var_Change( p_input_thread, psz_name, VLC_VAR_CHOICESCOUNT, &val, NULL );
+    int i_ret = var_Change( p_input_thread, psz_name, VLC_VAR_CHOICESCOUNT, &val );
     vlc_object_release( p_input_thread );
 
     return i_ret == VLC_SUCCESS ? val.i_int : -1;
@@ -1471,7 +1471,7 @@ int libvlc_media_player_get_title_count( libvlc_media_player_t *p_mi )
     if( !p_input_thread )
         return -1;
 
-    int i_ret = var_Change( p_input_thread, "title", VLC_VAR_CHOICESCOUNT, &val, NULL );
+    int i_ret = var_Change( p_input_thread, "title", VLC_VAR_CHOICESCOUNT, &val );
     vlc_object_release( p_input_thread );
 
     return i_ret == VLC_SUCCESS ? val.i_int : -1;
diff --git a/modules/gui/macosx/VLCMainMenu.m b/modules/gui/macosx/VLCMainMenu.m
index de286d2fb2..ae90a336ab 100644
--- a/modules/gui/macosx/VLCMainMenu.m
+++ b/modules/gui/macosx/VLCMainMenu.m
@@ -1471,7 +1471,7 @@
 
     /* Make sure we want to display the variable */
     if (i_type & VLC_VAR_HASCHOICE) {
-        var_Change(p_object, psz_variable, VLC_VAR_CHOICESCOUNT, &val, NULL);
+        var_Change(p_object, psz_variable, VLC_VAR_CHOICESCOUNT, &val);
         if (val.i_int == 0 || val.i_int == 1)
             return;
     }
diff --git a/modules/gui/qt/input_manager.cpp b/modules/gui/qt/input_manager.cpp
index ceb3f8dfac..978e426b76 100644
--- a/modules/gui/qt/input_manager.cpp
+++ b/modules/gui/qt/input_manager.cpp
@@ -441,7 +441,7 @@ void InputManager::UpdateNavigation()
     vlc_value_t val; val.i_int = 0;
     vlc_value_t val2; val2.i_int = 0;
 
-    var_Change( p_input, "title", VLC_VAR_CHOICESCOUNT, &val, NULL );
+    var_Change( p_input, "title", VLC_VAR_CHOICESCOUNT, &val );
 
     if( val.i_int > 0 )
     {
@@ -463,7 +463,7 @@ void InputManager::UpdateNavigation()
         }
 
         /* p_input != NULL since val.i_int != 0 */
-        var_Change( p_input, "chapter", VLC_VAR_CHOICESCOUNT, &val2, NULL );
+        var_Change( p_input, "chapter", VLC_VAR_CHOICESCOUNT, &val2 );
 
         emit titleChanged( b_menu );
         emit chapterChanged( val2.i_int > 1 );
@@ -553,7 +553,7 @@ bool InputManager::hasAudio()
     if( hasInput() )
     {
         vlc_value_t val;
-        var_Change( p_input, "audio-es", VLC_VAR_CHOICESCOUNT, &val, NULL );
+        var_Change( p_input, "audio-es", VLC_VAR_CHOICESCOUNT, &val );
         return val.i_int > 0;
     }
     return false;
diff --git a/modules/gui/qt/menus.cpp b/modules/gui/qt/menus.cpp
index 3652827f72..9d85e4a452 100644
--- a/modules/gui/qt/menus.cpp
+++ b/modules/gui/qt/menus.cpp
@@ -1240,7 +1240,7 @@ static bool IsMenuEmpty( const char *psz_var, vlc_object_t *p_object )
         return false;
 
     vlc_value_t val;
-    var_Change( p_object, psz_var, VLC_VAR_CHOICESCOUNT, &val, NULL );
+    var_Change( p_object, psz_var, VLC_VAR_CHOICESCOUNT, &val );
     return val.i_int == 0 || val.i_int == 1;
 }
 
diff --git a/modules/gui/skins2/src/vlcproc.cpp b/modules/gui/skins2/src/vlcproc.cpp
index 84ffc9c462..edcd0cd00a 100644
--- a/modules/gui/skins2/src/vlcproc.cpp
+++ b/modules/gui/skins2/src/vlcproc.cpp
@@ -484,8 +484,7 @@ void VlcProc::on_intf_event_changed( vlc_object_t* p_obj, vlc_value_t newVal )
         {
             // Do we have audio
             vlc_value_t audio_es;
-            var_Change( pInput, "audio-es", VLC_VAR_CHOICESCOUNT,
-                            &audio_es, NULL );
+            var_Change( pInput, "audio-es", VLC_VAR_CHOICESCOUNT, &audio_es );
             SET_BOOL( m_cVarHasAudio, audio_es.i_int > 0 );
             break;
         }
@@ -521,7 +520,7 @@ void VlcProc::on_intf_event_changed( vlc_object_t* p_obj, vlc_value_t newVal )
         {
             vlc_value_t chapters_count;
             var_Change( pInput, "chapter", VLC_VAR_CHOICESCOUNT,
-                        &chapters_count, NULL );
+                        &chapters_count );
             SET_BOOL( m_cVarDvdActive, chapters_count.i_int > 0 );
             break;
         }
diff --git a/src/input/es_out.c b/src/input/es_out.c
index 320c47fd45..6ff2cb2dbd 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -949,7 +949,7 @@ static void EsOutESVarUpdateGeneric( es_out_t *out, int i_id,
     else
         psz_var = "spu-es";
 
-    var_Change( p_input, psz_var, VLC_VAR_CHOICESCOUNT, &val, NULL );
+    var_Change( p_input, psz_var, VLC_VAR_CHOICESCOUNT, &val );
     if( val.i_int == 0 )
     {
         vlc_value_t val2;
diff --git a/src/input/input.c b/src/input/input.c
index 38fc3b0fe0..a2adbbf995 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -3225,7 +3225,7 @@ static int input_SlaveSourceAdd( input_thread_t *p_input,
     }
 
     if( b_forced )
-        var_Change( p_input, psz_es, VLC_VAR_CHOICESCOUNT, &count, NULL );
+        var_Change( p_input, psz_es, VLC_VAR_CHOICESCOUNT, &count );
 
     msg_Dbg( p_input, "loading %s slave: %s (forced: %d)", psz_es, psz_uri,
              b_forced );
diff --git a/src/input/var.c b/src/input/var.c
index 899499cf17..d834d1f060 100644
--- a/src/input/var.c
+++ b/src/input/var.c
@@ -665,7 +665,7 @@ static int TitleCallback( vlc_object_t *p_this, char const *psz_cmd,
         input_ControlPush( p_input, INPUT_CONTROL_SET_TITLE_NEXT, NULL );
 
         val.i_int = var_GetInteger( p_input, "title" ) + 1;
-        var_Change( p_input, "title", VLC_VAR_CHOICESCOUNT, &count, NULL );
+        var_Change( p_input, "title", VLC_VAR_CHOICESCOUNT, &count );
         if( val.i_int < count.i_int )
             var_Change( p_input, "title", VLC_VAR_SETVALUE, &val, NULL );
     }
@@ -706,7 +706,7 @@ static int SeekpointCallback( vlc_object_t *p_this, char const *psz_cmd,
         input_ControlPush( p_input, INPUT_CONTROL_SET_SEEKPOINT_NEXT, NULL );
 
         val.i_int = var_GetInteger( p_input, "chapter" ) + 1;
-        var_Change( p_input, "chapter", VLC_VAR_CHOICESCOUNT, &count, NULL );
+        var_Change( p_input, "chapter", VLC_VAR_CHOICESCOUNT, &count );
         if( val.i_int < count.i_int )
             var_Change( p_input, "chapter", VLC_VAR_SETVALUE, &val, NULL );
     }



More information about the vlc-commits mailing list