[vlc-commits] config: remove unused config_PutFloat() parameter

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


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

config: remove unused config_PutFloat() parameter

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

 include/vlc_configuration.h                       |  3 +--
 modules/audio_output/directsound.c                |  2 +-
 modules/audio_output/volume.h                     |  2 +-
 modules/audio_output/waveout.c                    |  4 ++--
 modules/gui/macosx/prefs_widgets.m                |  2 +-
 modules/gui/qt/components/preferences_widgets.cpp |  2 +-
 modules/gui/qt/components/simple_preferences.cpp  | 14 +++++++-------
 modules/gui/qt/dialogs/extended.cpp               |  2 +-
 modules/gui/skins2/vars/equalizer.cpp             |  2 +-
 modules/lua/libs/configuration.c                  |  3 +--
 src/config/core.c                                 |  8 ++------
 11 files changed, 19 insertions(+), 25 deletions(-)

diff --git a/include/vlc_configuration.h b/include/vlc_configuration.h
index 71b2acacbb..f013093774 100644
--- a/include/vlc_configuration.h
+++ b/include/vlc_configuration.h
@@ -181,7 +181,7 @@ VLC_API float config_GetFloat(const char *name) VLC_USED;
  * \param name Configuration item name
  * \param val New value
  */
-VLC_API void config_PutFloat(vlc_object_t *, const char *name, float val);
+VLC_API void config_PutFloat(const char *name, float val);
 
 /**
  * Gets an string configuration item.
@@ -323,7 +323,6 @@ VLC_API void config_AddIntf( vlc_object_t *, const char * );
 VLC_API void config_RemoveIntf( vlc_object_t *, const char * );
 VLC_API bool config_ExistIntf( vlc_object_t *, const char * ) VLC_USED;
 
-#define config_PutFloat(a,b,c) config_PutFloat(VLC_OBJECT(a),b,c)
 #define config_PutPsz(a,b,c) config_PutPsz(VLC_OBJECT(a),b,c)
 
 #define config_AddIntf(a,b) config_AddIntf(VLC_OBJECT(a),b)
diff --git a/modules/audio_output/directsound.c b/modules/audio_output/directsound.c
index 38d3e2927d..4f1c2040d5 100644
--- a/modules/audio_output/directsound.c
+++ b/modules/audio_output/directsound.c
@@ -934,7 +934,7 @@ static int VolumeSet( audio_output_t *p_aout, float volume )
     aout_VolumeReport( p_aout, volume );
 
     if( var_InheritBool( p_aout, "volume-save" ) )
-        config_PutFloat( p_aout, "directx-volume", volume );
+        config_PutFloat( "directx-volume", volume );
     return ret;
 }
 
diff --git a/modules/audio_output/volume.h b/modules/audio_output/volume.h
index 94732dc2d1..df69204f42 100644
--- a/modules/audio_output/volume.h
+++ b/modules/audio_output/volume.h
@@ -47,7 +47,7 @@ static int aout_SoftVolumeSet(audio_output_t *aout, float volume)
         return -1;
     sys->soft_gain = gain;
     if (var_InheritBool(aout, "volume-save"))
-        config_PutFloat(aout, MODULE_STRING"-gain", gain);
+        config_PutFloat(MODULE_STRING"-gain", gain);
 
     aout_VolumeReport(aout, volume);
     return 0;
diff --git a/modules/audio_output/waveout.c b/modules/audio_output/waveout.c
index 028d083322..0eb844bcd4 100644
--- a/modules/audio_output/waveout.c
+++ b/modules/audio_output/waveout.c
@@ -944,7 +944,7 @@ static int WaveoutVolumeSet( audio_output_t *p_aout, float volume )
     sys->f_volume = volume;
 
     if( var_InheritBool( p_aout, "volume-save" ) )
-        config_PutFloat( p_aout, "waveout-volume", volume );
+        config_PutFloat( "waveout-volume", volume );
 
     aout_VolumeReport( p_aout, volume );
     vlc_mutex_unlock(&p_aout->sys->lock);
@@ -1009,7 +1009,7 @@ static void WaveoutPollVolume( void * aout )
         p_aout->sys->f_volume = volume;
 
         if( var_InheritBool( p_aout, "volume-save" ) )
-            config_PutFloat( p_aout, "waveout-volume", volume );
+            config_PutFloat( "waveout-volume", volume );
 
         aout_VolumeReport( p_aout, volume );
     }
diff --git a/modules/gui/macosx/prefs_widgets.m b/modules/gui/macosx/prefs_widgets.m
index 8ac44a0d4e..32b83b5d12 100644
--- a/modules/gui/macosx/prefs_widgets.m
+++ b/modules/gui/macosx/prefs_widgets.m
@@ -879,7 +879,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc];              \
             config_PutInt(psz_name, [self intValue]);
             break;
         case CONFIG_ITEM_FLOAT:
-            config_PutFloat(getIntf(), psz_name, [self floatValue]);
+            config_PutFloat(psz_name, [self floatValue]);
             break;
     }
 }
diff --git a/modules/gui/qt/components/preferences_widgets.cpp b/modules/gui/qt/components/preferences_widgets.cpp
index b495f2832d..a1711bcec4 100644
--- a/modules/gui/qt/components/preferences_widgets.cpp
+++ b/modules/gui/qt/components/preferences_widgets.cpp
@@ -1041,7 +1041,7 @@ void ColorConfigControl::selectColor()
 void
 VFloatConfigControl::doApply()
 {
-    config_PutFloat( p_this, getName(), getValue() );
+    config_PutFloat( getName(), getValue() );
 }
 
 /*********** Float **************/
diff --git a/modules/gui/qt/components/simple_preferences.cpp b/modules/gui/qt/components/simple_preferences.cpp
index c03b300e2d..1a8ae09429 100644
--- a/modules/gui/qt/components/simple_preferences.cpp
+++ b/modules/gui/qt/components/simple_preferences.cpp
@@ -1124,24 +1124,24 @@ void SPrefsPanel::apply()
 #if defined( _WIN32 )
         VLC_UNUSED( f_gain );
         if( save_vol_aout( "mmdevice" ) )
-            config_PutFloat( p_intf, "mmdevice-volume", i_volume / 100.f );
+            config_PutFloat( "mmdevice-volume", i_volume / 100.f );
         if( save_vol_aout( "directsound" ) )
-            config_PutFloat( p_intf, "directx-volume", i_volume / 100.f );
+            config_PutFloat( "directx-volume", i_volume / 100.f );
         if( save_vol_aout( "waveout" ) )
-            config_PutFloat( p_intf, "waveout-volume", i_volume / 100.f );
+            config_PutFloat( "waveout-volume", i_volume / 100.f );
 #elif defined( Q_OS_MAC )
         VLC_UNUSED( f_gain );
         if( save_vol_aout( "auhal" ) )
-            config_PutFloat( p_intf, "auhal-volume", i_volume / 100.f
+            config_PutFloat( "auhal-volume", i_volume / 100.f
                     * AOUT_VOLUME_DEFAULT );
 #elif defined( __OS2__ )
         if( save_vol_aout( "kai" ) )
-            config_PutFloat( p_intf, "kai-gain",  f_gain );
+            config_PutFloat( "kai-gain",  f_gain );
 #else
         if( save_vol_aout( "alsa" ) )
-            config_PutFloat( p_intf, "alsa-gain", f_gain );
+            config_PutFloat( "alsa-gain", f_gain );
         if( save_vol_aout( "jack" ) )
-            config_PutFloat( p_intf, "jack-gain", f_gain );
+            config_PutFloat( "jack-gain", f_gain );
 #endif
 #undef save_vol_aout
         free( psz_aout );
diff --git a/modules/gui/qt/dialogs/extended.cpp b/modules/gui/qt/dialogs/extended.cpp
index 4837f929b4..aab0039fa5 100644
--- a/modules/gui/qt/dialogs/extended.cpp
+++ b/modules/gui/qt/dialogs/extended.cpp
@@ -214,7 +214,7 @@ void ExtendedDialog::saveConfig()
                 break;
             case QMetaType::Double:
             case QMetaType::Float:
-                config_PutFloat( p_intf, qtu(i.key()), value.toFloat() ) ;
+                config_PutFloat( qtu(i.key()), value.toFloat() ) ;
                 break;
             default:
                 vlc_assert_unreachable();
diff --git a/modules/gui/skins2/vars/equalizer.cpp b/modules/gui/skins2/vars/equalizer.cpp
index 8813d0b5ec..5377de321b 100644
--- a/modules/gui/skins2/vars/equalizer.cpp
+++ b/modules/gui/skins2/vars/equalizer.cpp
@@ -136,7 +136,7 @@ void EqualizerPreamp::set( float percentage, bool updateVLC )
     {
         float val = 40 * percentage - 20;
 
-        config_PutFloat( getIntf(), "equalizer-preamp", val );
+        config_PutFloat( "equalizer-preamp", val );
         if( pAout )
         {
             // Update the audio output
diff --git a/modules/lua/libs/configuration.c b/modules/lua/libs/configuration.c
index db766f0c00..52e022849e 100644
--- a/modules/lua/libs/configuration.c
+++ b/modules/lua/libs/configuration.c
@@ -91,8 +91,7 @@ static int vlclua_config_set( lua_State *L )
             break;
 
         case VLC_VAR_FLOAT:
-            config_PutFloat( p_this, psz_name,
-                             luaL_checknumber( L, 2 ) );
+            config_PutFloat( psz_name, luaL_checknumber( L, 2 ) );
             break;
 
         default:
diff --git a/src/config/core.c b/src/config/core.c
index 9201ce5245..7e7eb0631f 100644
--- a/src/config/core.c
+++ b/src/config/core.c
@@ -129,9 +129,7 @@ char *config_GetPsz(const char *psz_name)
     return psz_value;
 }
 
-#undef config_PutPsz
-void config_PutPsz( vlc_object_t *p_this,
-                      const char *psz_name, const char *psz_value )
+void config_PutPsz(const char *psz_name, const char *psz_value)
 {
     module_config_t *p_config = config_FindConfig( psz_name );
 
@@ -174,9 +172,7 @@ void config_PutInt(const char *psz_name, int64_t i_value )
     vlc_rwlock_unlock (&config_lock);
 }
 
-#undef config_PutFloat
-void config_PutFloat( vlc_object_t *p_this,
-                      const char *psz_name, float f_value )
+void config_PutFloat(const char *psz_name, float f_value)
 {
     module_config_t *p_config = config_FindConfig( psz_name );
 



More information about the vlc-commits mailing list