diff --git a/include/Dialog_Base_Partition.h b/include/Dialog_Base_Partition.h index ea651164..5397aea2 100644 --- a/include/Dialog_Base_Partition.h +++ b/include/Dialog_Base_Partition.h @@ -41,7 +41,7 @@ public: ~Dialog_Base_Partition( ) ; void Set_Resizer( bool extended ) ; - Partition Get_New_Partition( Byte_Value sector_size ) ; + const Partition & Get_New_Partition( Byte_Value sector_size ); protected: enum SPINBUTTON { diff --git a/include/Dialog_Partition_Copy.h b/include/Dialog_Partition_Copy.h index daadbffe..f91aae02 100644 --- a/include/Dialog_Partition_Copy.h +++ b/include/Dialog_Partition_Copy.h @@ -29,7 +29,7 @@ public: Dialog_Partition_Copy( const FS & fs, const Partition & selected_partition, const Partition & copied_partition ); - Partition Get_New_Partition( Byte_Value sector_size ) ; + const Partition & Get_New_Partition( Byte_Value sector_size ); private: void set_data( const Partition & selected_partition, const Partition & copied_partition ); diff --git a/include/Dialog_Partition_New.h b/include/Dialog_Partition_New.h index ce06dad7..4ce9828b 100644 --- a/include/Dialog_Partition_New.h +++ b/include/Dialog_Partition_New.h @@ -34,7 +34,7 @@ public: bool any_extended, unsigned short new_count, const std::vector & FILESYSTEMS ); - Partition Get_New_Partition( Byte_Value sector_size ) ;//overridden function + const Partition & Get_New_Partition( Byte_Value sector_size ); private: void set_data( const Device & device, diff --git a/src/Dialog_Base_Partition.cc b/src/Dialog_Base_Partition.cc index 8ff1fcd1..d58cee41 100644 --- a/src/Dialog_Base_Partition.cc +++ b/src/Dialog_Base_Partition.cc @@ -136,7 +136,7 @@ void Dialog_Base_Partition::Set_Resizer( bool extended ) this ->show_all_children() ; } -Partition Dialog_Base_Partition::Get_New_Partition( Byte_Value sector_size ) +const Partition & Dialog_Base_Partition::Get_New_Partition( Byte_Value sector_size ) { prepare_new_partition( sector_size ); return new_partition; diff --git a/src/Dialog_Partition_Copy.cc b/src/Dialog_Partition_Copy.cc index 21963d12..92a9ed15 100644 --- a/src/Dialog_Partition_Copy.cc +++ b/src/Dialog_Partition_Copy.cc @@ -117,7 +117,7 @@ void Dialog_Partition_Copy::set_data( const Partition & selected_partition, cons this ->show_all_children() ; } -Partition Dialog_Partition_Copy::Get_New_Partition( Byte_Value sector_size ) +const Partition & Dialog_Partition_Copy::Get_New_Partition( Byte_Value sector_size ) { //first call baseclass to get the correct new partition Dialog_Base_Partition::prepare_new_partition( sector_size ); diff --git a/src/Dialog_Partition_New.cc b/src/Dialog_Partition_New.cc index 08c26254..570e4ae9 100644 --- a/src/Dialog_Partition_New.cc +++ b/src/Dialog_Partition_New.cc @@ -177,7 +177,7 @@ void Dialog_Partition_New::set_data( const Device & device, this ->show_all_children() ; } -Partition Dialog_Partition_New::Get_New_Partition( Byte_Value sector_size ) +const Partition & Dialog_Partition_New::Get_New_Partition( Byte_Value sector_size ) { PartitionType part_type ; Sector new_start, new_end;