[vlc-commits] input var: avoid implicit double upconversion

Rémi Denis-Courmont git at videolan.org
Wed Aug 13 20:29:14 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Aug 13 21:09:29 2014 +0300| [73906514e8788a405d998772e64fc48d6a3d1479] | committer: Rémi Denis-Courmont

input var: avoid implicit double upconversion

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

 src/input/var.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/input/var.c b/src/input/var.c
index 7591de4..258b5f4 100644
--- a/src/input/var.c
+++ b/src/input/var.c
@@ -592,17 +592,17 @@ static int PositionCallback( vlc_object_t *p_this, char const *psz_cmd,
     if( !strcmp( psz_cmd, "position-offset" ) )
     {
         float f_position = var_GetFloat( p_input, "position" ) + newval.f_float;
-        if( f_position < 0.0 )
-            f_position = 0.0;
-        else if( f_position > 1.0 )
-            f_position = 1.0;
+        if( f_position < 0.f )
+            f_position = 0.f;
+        else if( f_position > 1.f )
+            f_position = 1.f;
         var_SetFloat( p_this, "position", f_position );
     }
     else
     {
         /* Update "length" for better intf behavour */
         const mtime_t i_length = var_GetTime( p_input, "length" );
-        if( i_length > 0 && newval.f_float >= 0.0 && newval.f_float <= 1.0 )
+        if( i_length > 0 && newval.f_float >= 0.f && newval.f_float <= 1.f )
         {
             vlc_value_t val;
 



More information about the vlc-commits mailing list