[vlc-commits] variables: remove useless VLC_VAR_GETMIN parameter
Rémi Denis-Courmont
git at videolan.org
Sun Jun 10 12:10:53 CEST 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jun 9 13:07:17 2018 +0300| [bee23fb0f83a910099382057f139bca1ed028e4d] | committer: Rémi Denis-Courmont
variables: remove useless VLC_VAR_GETMIN parameter
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bee23fb0f83a910099382057f139bca1ed028e4d
---
modules/gui/qt/components/extended_panels.cpp | 3 +--
test/src/misc/variables.c | 10 +++++-----
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/modules/gui/qt/components/extended_panels.cpp b/modules/gui/qt/components/extended_panels.cpp
index e512a40a40..39ee1ef085 100644
--- a/modules/gui/qt/components/extended_panels.cpp
+++ b/modules/gui/qt/components/extended_panels.cpp
@@ -717,8 +717,7 @@ void ExtV4l2::Refresh( void )
slider->setObjectName( qfu( psz_var ) );
slider->setOrientation( Qt::Horizontal );
vlc_value_t val2;
- var_Change( p_obj, psz_var, VLC_VAR_GETMIN,
- &val2, NULL );
+ var_Change( p_obj, psz_var, VLC_VAR_GETMIN, &val2 );
if( val2.i_int < INT_MIN )
val2.i_int = INT_MIN; /* FIXME */
slider->setMinimum( val2.i_int );
diff --git a/test/src/misc/variables.c b/test/src/misc/variables.c
index 0637a53ed7..d97eeaf752 100644
--- a/test/src/misc/variables.c
+++ b/test/src/misc/variables.c
@@ -284,7 +284,7 @@ static void test_limits( libvlc_int_t *p_libvlc )
val.i_int = 0;
var_Create( p_libvlc, "bla", VLC_VAR_INTEGER );
- var_Change( p_libvlc, "bla", VLC_VAR_GETMIN, &val, NULL );
+ var_Change( p_libvlc, "bla", VLC_VAR_GETMIN, &val );
assert( val.i_int == INT64_MIN );
var_Change( p_libvlc, "bla", VLC_VAR_GETMAX, &val, NULL );
assert( val.i_int == INT64_MAX );
@@ -293,7 +293,7 @@ static void test_limits( libvlc_int_t *p_libvlc )
&(vlc_value_t){ .i_int = -1234 },
&(vlc_value_t){ .i_int = 12345 } );
- var_Change( p_libvlc, "bla", VLC_VAR_GETMIN, &val, NULL );
+ var_Change( p_libvlc, "bla", VLC_VAR_GETMIN, &val );
assert( val.i_int == -1234 );
var_Change( p_libvlc, "bla", VLC_VAR_GETMAX, &val, NULL );
assert( val.i_int == 12345 );
@@ -376,7 +376,7 @@ static void test_change( libvlc_int_t *p_libvlc )
assert( var_GetInteger( p_libvlc, "bla" ) == -26 );
/* Test everything is right */
- var_Change( p_libvlc, "bla", VLC_VAR_GETMIN, &val, NULL );
+ var_Change( p_libvlc, "bla", VLC_VAR_GETMIN, &val );
assert( val.i_int == min.i_int );
var_Change( p_libvlc, "bla", VLC_VAR_GETMAX, &val, NULL );
assert( val.i_int == max.i_int );
@@ -400,13 +400,13 @@ static void test_creation_and_type( libvlc_int_t *p_libvlc )
assert( var_Create( p_libvlc, "bla", VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND ) == VLC_SUCCESS );
assert( var_Type( p_libvlc, "bla" ) == (VLC_VAR_INTEGER | VLC_VAR_ISCOMMAND) );
- assert( var_Change( p_libvlc, "bla", VLC_VAR_GETMIN, &val, NULL ) != 0
+ assert( var_Change( p_libvlc, "bla", VLC_VAR_GETMIN, &val ) != 0
|| val.i_int == INT64_MIN );
assert( var_Change( p_libvlc, "bla", VLC_VAR_GETMAX, &val, NULL ) != 0
|| val.i_int == INT64_MAX );
val.i_int = 4212;
var_Change( p_libvlc, "bla", VLC_VAR_SETMINMAX, &val, &val );
- assert( var_Change( p_libvlc, "bla", VLC_VAR_GETMIN, &val, NULL ) == 0
+ assert( var_Change( p_libvlc, "bla", VLC_VAR_GETMIN, &val ) == 0
&& val.i_int == 4212 );
assert( var_Change( p_libvlc, "bla", VLC_VAR_GETMAX, &val, NULL ) == 0
&& val.i_int == 4212 );
More information about the vlc-commits
mailing list