[vlc-commits] config: remove unused config_ExistIntf() parameter
Rémi Denis-Courmont
git at videolan.org
Wed Feb 28 19:12:10 CET 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Feb 28 19:43:55 2018 +0200| [8915c3d6ec82cbbe3db9b050c930377ff97a9e14] | committer: Rémi Denis-Courmont
config: remove unused config_ExistIntf() parameter
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8915c3d6ec82cbbe3db9b050c930377ff97a9e14
---
include/vlc_configuration.h | 4 +---
modules/gui/macosx/VLCSimplePrefsController.m | 2 +-
modules/gui/qt/components/simple_preferences.cpp | 2 +-
src/config/intf.c | 3 +--
4 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/include/vlc_configuration.h b/include/vlc_configuration.h
index 6636db7ca0..100ebe92c1 100644
--- a/include/vlc_configuration.h
+++ b/include/vlc_configuration.h
@@ -321,9 +321,7 @@ VLC_API char * config_GetUserDir( vlc_userdir_t ) VLC_USED VLC_MALLOC;
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_ExistIntf(a,b) config_ExistIntf(VLC_OBJECT(a),b)
+VLC_API bool config_ExistIntf(const char *) VLC_USED;
/****************************************************************************
* config_chain_t:
diff --git a/modules/gui/macosx/VLCSimplePrefsController.m b/modules/gui/macosx/VLCSimplePrefsController.m
index 5ac91f83f7..bf9b9be839 100644
--- a/modules/gui/macosx/VLCSimplePrefsController.m
+++ b/modules/gui/macosx/VLCSimplePrefsController.m
@@ -628,7 +628,7 @@ static inline const char * __config_GetLabel(vlc_object_t *p_this, const char *p
[self setupField:_audio_lastuserTextField forOption:"lastfm-username"];
[self setupField:_audio_lastpwdSecureTextField forOption:"lastfm-password"];
- if (config_ExistIntf(VLC_OBJECT(p_intf), "audioscrobbler")) {
+ if (config_ExistIntf("audioscrobbler")) {
[_audio_lastCheckbox setState: NSOnState];
[_audio_lastuserTextField setEnabled: YES];
[_audio_lastpwdSecureTextField setEnabled: YES];
diff --git a/modules/gui/qt/components/simple_preferences.cpp b/modules/gui/qt/components/simple_preferences.cpp
index 3d4c1fb199..b9eae45e0c 100644
--- a/modules/gui/qt/components/simple_preferences.cpp
+++ b/modules/gui/qt/components/simple_preferences.cpp
@@ -573,7 +573,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
CONFIG_GENERIC( "lastfm-password", String, ui.lastfm_pass_label,
lastfm_pass_edit );
- if( config_ExistIntf( VLC_OBJECT( p_intf ), "audioscrobbler" ) )
+ if( config_ExistIntf( "audioscrobbler" ) )
ui.lastfm->setChecked( true );
else
ui.lastfm->setChecked( false );
diff --git a/src/config/intf.c b/src/config/intf.c
index 3cf733b718..544dfb3ad7 100644
--- a/src/config/intf.c
+++ b/src/config/intf.c
@@ -129,12 +129,11 @@ void config_RemoveIntf( const char *psz_intf )
free( psz_config );
}
-#undef config_ExistIntf
/*
* Returns true if the specified extra interface is present in the
* configuration, false if not
*/
-bool config_ExistIntf( vlc_object_t *p_this, const char *psz_intf )
+bool config_ExistIntf( const char *psz_intf )
{
assert( psz_intf );
More information about the vlc-commits
mailing list