[Plib-cvs] plib/src/pui pu.h,1.123,1.124
Brought to you by:
sjbaker
|
From: Wolfram K. <wol...@us...> - 2002-09-01 09:17:17
|
Update of /cvsroot/plib/plib/src/pui
In directory usw-pr-cvs1:/tmp/cvs-serv28938
Modified Files:
pu.h
Log Message:
Removing compile warnings due to implicit type conversions
Index: pu.h
===================================================================
RCS file: /cvsroot/plib/plib/src/pui/pu.h,v
retrieving revision 1.123
retrieving revision 1.124
diff -u -d -r1.123 -r1.124
--- pu.h 1 Sep 2002 07:45:08 -0000 1.123
+++ pu.h 1 Sep 2002 09:15:50 -0000 1.124
@@ -1125,7 +1125,7 @@
if ( getStepSize() > 0.0 )
{
- step = val_to_check - fmod ( val_to_check, getStepSize() ) ;
+ step = val_to_check - (float) fmod ( val_to_check, getStepSize() ) ;
if ( ( val_to_check - step ) > ( step + getStepSize() - val_to_check ) ) step += getStepSize() ;
}
@@ -1232,7 +1232,7 @@
void setMaxValue ( float i )
{
maximum_value = i ;
- slider_fraction = 1.0f / ( getMaxValue() - getMinValue() + 1.0 ) ;
+ slider_fraction = 1.0f / ( getMaxValue() - getMinValue() + 1.0f ) ;
puPostRefresh () ;
}
@@ -1240,15 +1240,15 @@
void setMinValue ( float i )
{
minimum_value = i ;
- slider_fraction = 1.0f / ( getMaxValue() - getMinValue() + 1.0 ) ;
+ slider_fraction = 1.0f / ( getMaxValue() - getMinValue() + 1.0f ) ;
puPostRefresh () ;
}
- void setCurrentMax ( int i ) { current_max = i ; puPostRefresh () ; } /* DEPRECATED */
+ void setCurrentMax ( int i ) { current_max = (float) i ; puPostRefresh () ; } /* DEPRECATED */
void setCurrentMax ( float f ) { current_max = f ; puPostRefresh () ; }
float getCurrentMax ( void ) const { return current_max ; }
- void setCurrentMin ( int i ) { current_min = i ; puPostRefresh () ; } /* DEPRECATED */
+ void setCurrentMin ( int i ) { current_min = (float) i ; puPostRefresh () ; } /* DEPRECATED */
void setCurrentMin ( float f ) { current_min = f ; puPostRefresh () ; }
float getCurrentMin ( void ) const { return current_min ; }
@@ -1322,7 +1322,7 @@
void setMaxValue ( float f )
{
maximum_value = f ;
- slider_fraction = 1.0f / ( getMaxValue() - getMinValue() + 1.0 ) ;
+ slider_fraction = 1.0f / ( getMaxValue() - getMinValue() + 1.0f ) ;
puPostRefresh () ;
}
@@ -1330,7 +1330,7 @@
void setMinValue ( float i )
{
minimum_value = i ;
- slider_fraction = 1.0f / ( getMaxValue() - getMinValue() + 1.0 ) ;
+ slider_fraction = 1.0f / ( getMaxValue() - getMinValue() + 1.0f ) ;
puPostRefresh () ;
}
} ;
|