Skip to content
  • Mike Fleetwood's avatar
    Remove unnecessary sector_size parameter from Get_New_Partition methods · 24fa5533
    Mike Fleetwood authored and Curtis Gedak's avatar Curtis Gedak committed
    The sector_size parameter is unnecessary as the value can be retrieved
    from the sector size of the selected Partition object on which the
    create new, copy & paste or resize/move operation is being performed.
    
    For the create new and resize/move operations it is trivial as the
    existing unallocated or in use Partition object on which the operation
    is being perform already contains the correct sector size.  For the copy
    & paste operation, which can copy across disk devices of different
    sector sizes, we merely have to use the sector size of the existing
    selected (destination) Partition object rather than copied (source)
    Partition object.  Hence these relevant lines in the new code:
    
        Dialog_Partition_Copy::set_data(selected_partition, copied_partition)
            new_partition = copied_partition.clone();
            ...
            new_partition->sector_size = selected_partition.sector_size;
    24fa5533