diff --git a/ChangeLog b/ChangeLog index 9f236a2a..a3bc3006 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-01-11 Bart Hakvoort + + * include/Utils.h: used static_cast<> instead of C-style type conversion. + * src/Makefile.am: install gparted binary in bin/ instead of sbin/ (as soon as i've time i want to implement a read-only modus) + 2005-01-11 Bart Hakvoort * src/Win_GParted.cc: activate_convert used old filesystem instead of new one for checks. fixed. diff --git a/include/Utils.h b/include/Utils.h index 87548cd6..85855e36 100644 --- a/include/Utils.h +++ b/include/Utils.h @@ -62,14 +62,14 @@ struct FS //globally used convenience functions -inline long Sector_To_MB( Sector sectors ) -{ - return (long) ( (double) sectors * 512/1024/1024 +0.5) ; -} - inline long Round( double double_value ) { - return (long) ( double_value + 0.5) ; + return static_cast ( double_value + 0.5 ) ; +} + +inline long Sector_To_MB( Sector sectors ) +{ + return Round( sectors * 0.000488281250 ) ; // that's what 512/1024/1024 gives you :) } inline Sector Abs( Sector sectors ) diff --git a/src/Makefile.am b/src/Makefile.am index 4432e4b6..83b9944f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,7 +10,7 @@ AM_CXXFLAGS =\ -Wall\ -g -sbin_PROGRAMS = gparted +bin_PROGRAMS = gparted gparted_SOURCES = \ Device.cc\