[vlc-commits] qt: remove dead code

Rémi Denis-Courmont git at videolan.org
Thu Jul 18 22:25:19 CEST 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 18 23:20:51 2019 +0300| [4c1f9683d6d322557ed32fb2eb754b725453b749] | committer: Rémi Denis-Courmont

qt: remove dead code

Scalar configuration items always have a minimum and maximum.
The only way that both min and max would be zero would be if the range
was explicitly set to be the singleton zero, which would make no sense,
and indeed never happens.

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

 modules/gui/qt/components/preferences_widgets.cpp | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/modules/gui/qt/components/preferences_widgets.cpp b/modules/gui/qt/components/preferences_widgets.cpp
index af52080a5b..0f73252685 100644
--- a/modules/gui/qt/components/preferences_widgets.cpp
+++ b/modules/gui/qt/components/preferences_widgets.cpp
@@ -108,10 +108,8 @@ ConfigControl *ConfigControl::createControl( vlc_object_t *p_this,
     case CONFIG_ITEM_INTEGER:
         if( p_item->list_count )
             p_control = new IntegerListConfigControl( p_this, p_item, parent, false );
-        else if( p_item->min.i || p_item->max.i )
-            p_control = new IntegerRangeConfigControl( p_this, p_item, parent );
         else
-            p_control = new IntegerConfigControl( p_this, p_item, parent );
+            p_control = new IntegerRangeConfigControl( p_this, p_item, parent );
         break;
     case CONFIG_ITEM_LOADFILE:
     case CONFIG_ITEM_SAVEFILE:
@@ -130,10 +128,7 @@ ConfigControl *ConfigControl::createControl( vlc_object_t *p_this,
         p_control = new BoolConfigControl( p_this, p_item, parent );
         break;
     case CONFIG_ITEM_FLOAT:
-        if( p_item->min.f || p_item->max.f )
-            p_control = new FloatRangeConfigControl( p_this, p_item, parent );
-        else
-            p_control = new FloatConfigControl( p_this, p_item, parent );
+        p_control = new FloatRangeConfigControl( p_this, p_item, parent );
         break;
     default:
         break;



More information about the vlc-commits mailing list