Commit 05faedf1 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

variables: avoid implicit upconversion to double

parent 73906514
...@@ -1248,13 +1248,10 @@ static void CheckValue ( variable_t *p_var, vlc_value_t *p_val ) ...@@ -1248,13 +1248,10 @@ static void CheckValue ( variable_t *p_var, vlc_value_t *p_val )
case VLC_VAR_FLOAT: case VLC_VAR_FLOAT:
if( p_var->i_type & VLC_VAR_HASSTEP && p_var->step.f_float ) if( p_var->i_type & VLC_VAR_HASSTEP && p_var->step.f_float )
{ {
float f_round = p_var->step.f_float * (float)(int)( 0.5 + float f_round = p_var->step.f_float
p_val->f_float / p_var->step.f_float ); * roundf( p_val->f_float / p_var->step.f_float );
if( p_val->f_float != f_round )
{
p_val->f_float = f_round; p_val->f_float = f_round;
} }
}
if( p_var->i_type & VLC_VAR_HASMIN if( p_var->i_type & VLC_VAR_HASMIN
&& p_val->f_float < p_var->min.f_float ) && p_val->f_float < p_var->min.f_float )
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment