[gparted] Remove unused device parameter from a few GParted_Core methods
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Remove unused device parameter from a few GParted_Core methods
- Date: Mon, 9 Mar 2015 17:12:11 +0000 (UTC)
commit 4d83d3723d1ff40c93bc2f167058b836e06f267c
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Sun Jan 18 15:46:10 2015 +0000
Remove unused device parameter from a few GParted_Core methods
resize_move() and move() stopped using the device parameter in this
commit from 2006-07-23:
d663c3c277f60da2ac1785c039f25f7920a315e9
removed cylindersize buffering during resize from the filesystems. It is
create() stopped using the device parameter in this commit from 2006-03-19:
ad9f2126e7fc92c16fffe839847dfe1c520146c8
fixed issues with copying (see also #335004) cleanups + added FIXME added
For reference most other operation methods had the device parameter
removed in this earlier commit from 2005-12-07:
642f0a145bc4b45a774dbf39e9cad4eb66afe56a
from now on each partition has a reference to it's device. make use of new
include/GParted_Core.h | 16 +++++++---------
src/GParted_Core.cc | 33 ++++++++++++++-------------------
2 files changed, 21 insertions(+), 28 deletions(-)
---
diff --git a/include/GParted_Core.h b/include/GParted_Core.h
index 29eca5f..f96b0f9 100644
--- a/include/GParted_Core.h
+++ b/include/GParted_Core.h
@@ -105,7 +105,7 @@ private:
void set_flags( Partition & partition, PedPartition* lp_partition ) ;
//operationstuff...
- bool create( const Device & device, Partition & new_partition, OperationDetail & operationdetail ) ;
+ bool create( Partition & new_partition, OperationDetail & operationdetail );
bool create_partition( Partition & new_partition, OperationDetail & operationdetail, Sector min_size
= 0 ) ;
bool create_filesystem( const Partition & partition, OperationDetail & operationdetail ) ;
@@ -121,14 +121,12 @@ private:
bool change_uuid( const Partition & partition, OperationDetail & operation_detail ) ;
- bool resize_move( const Device & device,
- const Partition & partition_old,
- Partition & partition_new,
- OperationDetail & operationdetail ) ;
- bool move( const Device & device,
- const Partition & partition_old,
- const Partition & partition_new,
- OperationDetail & operationdetail ) ;
+ bool resize_move( const Partition & partition_old,
+ Partition & partition_new,
+ OperationDetail & operationdetail );
+ bool move( const Partition & partition_old,
+ const Partition & partition_new,
+ OperationDetail & operationdetail );
bool move_filesystem( const Partition & partition_old,
const Partition & partition_new,
OperationDetail & operationdetail ) ;
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index 52df5e4..9ca0961 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -753,17 +753,14 @@ bool GParted_Core::apply_operation_to_disk( Operation * operation )
maximize_filesystem( operation ->partition_original, operation
->operation_detail ) ;
break ;
case OPERATION_CREATE:
- succes = create( operation ->device,
- operation ->partition_new,
- operation ->operation_detail ) ;
+ succes = create( operation->partition_new, operation->operation_detail );
break ;
case OPERATION_RESIZE_MOVE:
//in case the to be resized/moved partition was a 'copy of..', we need a real
path...
operation ->partition_new .add_path( operation ->partition_original
.get_path(), true ) ;
- succes = resize_move( operation ->device,
- operation ->partition_original,
- operation ->partition_new,
- operation ->operation_detail ) ;
+ succes = resize_move( operation ->partition_original,
+ operation ->partition_new,
+ operation ->operation_detail );
break ;
case OPERATION_FORMAT:
succes = remove_filesystem( operation ->partition_original, operation
->operation_detail ) &&
@@ -1961,7 +1958,7 @@ void GParted_Core::set_flags( Partition & partition, PedPartition* lp_partition
partition .flags .push_back( ped_partition_flag_get_name( flags[ t ] ) ) ;
}
-bool GParted_Core::create( const Device & device, Partition & new_partition, OperationDetail &
operationdetail )
+bool GParted_Core::create( Partition & new_partition, OperationDetail & operationdetail )
{
if ( new_partition .type == GParted::TYPE_EXTENDED )
{
@@ -2299,10 +2296,9 @@ bool GParted_Core::change_uuid( const Partition & partition, OperationDetail & o
return succes ;
}
-bool GParted_Core::resize_move( const Device & device,
- const Partition & partition_old,
- Partition & partition_new,
- OperationDetail & operationdetail )
+bool GParted_Core::resize_move( const Partition & partition_old,
+ Partition & partition_new,
+ OperationDetail & operationdetail )
{
if ( (partition_new .alignment == ALIGN_STRICT)
|| (partition_new .alignment == ALIGN_MEBIBYTE)
@@ -2317,7 +2313,7 @@ bool GParted_Core::resize_move( const Device & device,
return resize( partition_old, partition_new, operationdetail ) ;
if ( partition_new .get_sector_length() == partition_old .get_sector_length() )
- return move( device, partition_old, partition_new, operationdetail ) ;
+ return move( partition_old, partition_new, operationdetail );
Partition temp ;
if ( partition_new .get_sector_length() > partition_old .get_sector_length() )
@@ -2336,19 +2332,18 @@ bool GParted_Core::resize_move( const Device & device,
PartitionAlignment previous_alignment = temp .alignment ;
temp .alignment = ALIGN_STRICT ;
- bool succes = resize_move( device, partition_old, temp, operationdetail ) ;
+ bool succes = resize_move( partition_old, temp, operationdetail );
temp .alignment = previous_alignment ;
- return succes && resize_move( device, temp, partition_new, operationdetail ) ;
+ return succes && resize_move( temp, partition_new, operationdetail );
}
return false ;
}
-bool GParted_Core::move( const Device & device,
- const Partition & partition_old,
- const Partition & partition_new,
- OperationDetail & operationdetail )
+bool GParted_Core::move( const Partition & partition_old,
+ const Partition & partition_new,
+ OperationDetail & operationdetail )
{
if ( partition_old .get_sector_length() != partition_new .get_sector_length() )
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]