replaced C-style cast with static_cast removed unnecessary 'int

* src/TreeView_Detail.cc: replaced C-style cast with static_cast
* src/VBox_VisualDisk.cc: removed unnecessary 'int ext_length'
This commit is contained in:
Bart Hakvoort 2005-12-24 13:31:09 +00:00
parent 7ef6e3e5c8
commit 45e29fb694
3 changed files with 9 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2005-12-24 Bart Hakvoort <hakvoort@cvs.gnome.org>
* src/TreeView_Detail.cc: replaced C-style cast with static_cast
* src/VBox_VisualDisk.cc: removed unnecessary 'int ext_length'
2005-12-24 Bart Hakvoort <hakvoort@cvs.gnome.org>
* include/TreeView_Detail.h,

View File

@ -122,7 +122,7 @@ void TreeView_Detail::create_row( const Gtk::TreeRow & treerow, const Partition
treerow[ treeview_detail_columns .status_icon ] = render_icon( Gtk::Stock::DIALOG_AUTHENTICATION, Gtk::ICON_SIZE_BUTTON );
else if ( partition .error != "" )
treerow[ treeview_detail_columns .status_icon ] = render_icon( Gtk::Stock::DIALOG_WARNING, Gtk::ICON_SIZE_BUTTON );
treerow[ treeview_detail_columns .partition ] = partition .partition;
treerow[ treeview_detail_columns .color ] = Utils::get_color_as_pixbuf( partition .filesystem, 16, 16 ) ;
@ -171,7 +171,7 @@ void TreeView_Detail::on_selection_changed()
{
if ( ! block && treeselection ->get_selected() != 0 )
{
row = (Gtk::TreeRow) * treeselection ->get_selected() ;
row = static_cast<Gtk::TreeRow>( * treeselection ->get_selected() ) ;
signal_partition_selected .emit( row[ treeview_detail_columns .partition_struct ], true ) ;
}
}

View File

@ -138,11 +138,8 @@ int VBox_VisualDisk::calc_length( std::vector<visual_partition> & visual_partiti
visual_partitions[ t ] .length = Utils::Round( length_px * visual_partitions[ t ] .fraction ) ;
if ( visual_partitions[ t ] .logicals .size() > 0 )
{
int ext_length = calc_length( visual_partitions[ t ] .logicals, visual_partitions[ t ] .length - (2 * BORDER) ) ;
visual_partitions[ t ] .length = ext_length + (2 * BORDER) ;
}
visual_partitions[ t ] .length =
calc_length( visual_partitions[ t ] .logicals, visual_partitions[ t ] .length - (2 * BORDER) ) + (2 * BORDER) ;
else if ( visual_partitions[ t ] .length < MIN_SIZE )
visual_partitions[ t ] .length = MIN_SIZE ;