[vlc-commits] config: remove unused config_(Add|Remove)Intf() parameter

Rémi Denis-Courmont git at videolan.org
Wed Feb 28 19:12:09 CET 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Feb 28 19:43:55 2018 +0200| [9f4e45f9bf72fa2e9fa4f56f1f76c39ed02d08eb] | committer: Rémi Denis-Courmont

config: remove unused config_(Add|Remove)Intf() parameter

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

 include/vlc_configuration.h                      | 6 ++----
 modules/gui/macosx/VLCSimplePrefsController.m    | 4 ++--
 modules/gui/qt/components/simple_preferences.cpp | 4 ++--
 src/config/intf.c                                | 6 ++----
 4 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/include/vlc_configuration.h b/include/vlc_configuration.h
index 3677f0ca85..6636db7ca0 100644
--- a/include/vlc_configuration.h
+++ b/include/vlc_configuration.h
@@ -319,12 +319,10 @@ typedef enum vlc_userdir
 
 VLC_API char * config_GetUserDir( vlc_userdir_t ) VLC_USED VLC_MALLOC;
 
-VLC_API void config_AddIntf( vlc_object_t *, const char * );
-VLC_API void config_RemoveIntf( vlc_object_t *, const char * );
+VLC_API void config_AddIntf(const char *);
+VLC_API void config_RemoveIntf(const char *);
 VLC_API bool config_ExistIntf( vlc_object_t *, const char * ) VLC_USED;
 
-#define config_AddIntf(a,b) config_AddIntf(VLC_OBJECT(a),b)
-#define config_RemoveIntf(a,b) config_RemoveIntf(VLC_OBJECT(a),b)
 #define config_ExistIntf(a,b) config_ExistIntf(VLC_OBJECT(a),b)
 
 /****************************************************************************
diff --git a/modules/gui/macosx/VLCSimplePrefsController.m b/modules/gui/macosx/VLCSimplePrefsController.m
index da565dca5c..5ac91f83f7 100644
--- a/modules/gui/macosx/VLCSimplePrefsController.m
+++ b/modules/gui/macosx/VLCSimplePrefsController.m
@@ -956,9 +956,9 @@ static inline void save_string_list(intf_thread_t * p_intf, id object, const cha
         if (module_exists("audioscrobbler")) {
             [_audio_lastCheckbox setEnabled: YES];
             if ([_audio_lastCheckbox state] == NSOnState)
-                config_AddIntf(p_intf, "audioscrobbler");
+                config_AddIntf("audioscrobbler");
             else
-                config_RemoveIntf(p_intf, "audioscrobbler");
+                config_RemoveIntf("audioscrobbler");
 
             config_PutPsz("lastfm-username", [[_audio_lastuserTextField stringValue] UTF8String]);
             config_PutPsz("lastfm-password", [[_audio_lastpwdSecureTextField stringValue] UTF8String]);
diff --git a/modules/gui/qt/components/simple_preferences.cpp b/modules/gui/qt/components/simple_preferences.cpp
index e54f04a1b0..3d4c1fb199 100644
--- a/modules/gui/qt/components/simple_preferences.cpp
+++ b/modules/gui/qt/components/simple_preferences.cpp
@@ -1178,9 +1178,9 @@ void SPrefsPanel::clean()
 void SPrefsPanel::lastfm_Changed( int i_state )
 {
     if( i_state == Qt::Checked )
-        config_AddIntf( VLC_OBJECT( p_intf ), "audioscrobbler" );
+        config_AddIntf( "audioscrobbler" );
     else if( i_state == Qt::Unchecked )
-        config_RemoveIntf( VLC_OBJECT( p_intf ), "audioscrobbler" );
+        config_RemoveIntf( "audioscrobbler" );
 }
 
 void SPrefsPanel::changeStyle( QString s_style )
diff --git a/src/config/intf.c b/src/config/intf.c
index c38c303084..3cf733b718 100644
--- a/src/config/intf.c
+++ b/src/config/intf.c
@@ -29,9 +29,8 @@
 
 #include <assert.h>
 
-#undef config_AddIntf
 /* Adds an extra interface to the configuration */
-void config_AddIntf( vlc_object_t *p_this, const char *psz_intf )
+void config_AddIntf( const char *psz_intf )
 {
     assert( psz_intf );
 
@@ -79,9 +78,8 @@ void config_AddIntf( vlc_object_t *p_this, const char *psz_intf )
     free( psz_config );
 }
 
-#undef config_RemoveIntf
 /* Removes an extra interface from the configuration */
-void config_RemoveIntf( vlc_object_t *p_this, const char *psz_intf )
+void config_RemoveIntf( const char *psz_intf )
 {
     assert( psz_intf );
 



More information about the vlc-commits mailing list