From 6e31d9de4bb2ee7fe79fe291d2b4e99239815c50 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 3 Aug 2020 13:41:34 +0200 Subject: [PATCH] [partition] Name deviceInfo consistently, auto* - use auto* for pointer type where we already say "device info" twice --- .../partition/core/PartitionCoreModule.cpp | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/modules/partition/core/PartitionCoreModule.cpp b/src/modules/partition/core/PartitionCoreModule.cpp index b1124a6c6..078faba27 100644 --- a/src/modules/partition/core/PartitionCoreModule.cpp +++ b/src/modules/partition/core/PartitionCoreModule.cpp @@ -328,24 +328,24 @@ PartitionCoreModule::immutableDeviceCopy( const Device* device ) void PartitionCoreModule::createPartitionTable( Device* device, PartitionTable::TableType type ) { - DeviceInfo* info = infoForDevice( device ); - if ( info ) + auto* deviceInfo = infoForDevice( device ); + if ( deviceInfo ) { // Creating a partition table wipes all the disk, so there is no need to // keep previous changes - info->forgetChanges(); + deviceInfo->forgetChanges(); OperationHelper helper( partitionModelForDevice( device ), this ); CreatePartitionTableJob* job = new CreatePartitionTableJob( device, type ); job->updatePreview(); - info->jobs << Calamares::job_ptr( job ); + deviceInfo->jobs << Calamares::job_ptr( job ); } } void PartitionCoreModule::createPartition( Device* device, Partition* partition, PartitionTable::Flags flags ) { - auto deviceInfo = infoForDevice( device ); + auto* deviceInfo = infoForDevice( device ); Q_ASSERT( deviceInfo ); OperationHelper helper( partitionModelForDevice( device ), this ); @@ -396,7 +396,7 @@ PartitionCoreModule::createVolumeGroup( QString& vgName, QVector< const Partitio void PartitionCoreModule::resizeVolumeGroup( LvmDevice* device, QVector< const Partition* >& pvList ) { - DeviceInfo* deviceInfo = infoForDevice( device ); + auto* deviceInfo = infoForDevice( device ); Q_ASSERT( deviceInfo ); ResizeVolumeGroupJob* job = new ResizeVolumeGroupJob( device, pvList ); @@ -409,7 +409,7 @@ PartitionCoreModule::resizeVolumeGroup( LvmDevice* device, QVector< const Partit void PartitionCoreModule::deactivateVolumeGroup( LvmDevice* device ) { - DeviceInfo* deviceInfo = infoForDevice( device ); + auto* deviceInfo = infoForDevice( device ); Q_ASSERT( deviceInfo ); deviceInfo->isAvailable = false; @@ -425,7 +425,7 @@ PartitionCoreModule::deactivateVolumeGroup( LvmDevice* device ) void PartitionCoreModule::removeVolumeGroup( LvmDevice* device ) { - DeviceInfo* deviceInfo = infoForDevice( device ); + auto* deviceInfo = infoForDevice( device ); Q_ASSERT( deviceInfo ); RemoveVolumeGroupJob* job = new RemoveVolumeGroupJob( device ); @@ -438,7 +438,7 @@ PartitionCoreModule::removeVolumeGroup( LvmDevice* device ) void PartitionCoreModule::deletePartition( Device* device, Partition* partition ) { - auto deviceInfo = infoForDevice( device ); + auto* deviceInfo = infoForDevice( device ); Q_ASSERT( deviceInfo ); OperationHelper helper( partitionModelForDevice( device ), this ); @@ -525,7 +525,7 @@ PartitionCoreModule::deletePartition( Device* device, Partition* partition ) void PartitionCoreModule::formatPartition( Device* device, Partition* partition ) { - auto deviceInfo = infoForDevice( device ); + auto* deviceInfo = infoForDevice( device ); Q_ASSERT( deviceInfo ); OperationHelper helper( partitionModelForDevice( device ), this ); @@ -536,7 +536,7 @@ PartitionCoreModule::formatPartition( Device* device, Partition* partition ) void PartitionCoreModule::resizePartition( Device* device, Partition* partition, qint64 first, qint64 last ) { - auto deviceInfo = infoForDevice( device ); + auto* deviceInfo = infoForDevice( device ); Q_ASSERT( deviceInfo ); OperationHelper helper( partitionModelForDevice( device ), this ); @@ -548,7 +548,7 @@ PartitionCoreModule::resizePartition( Device* device, Partition* partition, qint void PartitionCoreModule::setPartitionFlags( Device* device, Partition* partition, PartitionTable::Flags flags ) { - auto deviceInfo = infoForDevice( device ); + auto* deviceInfo = infoForDevice( device ); Q_ASSERT( deviceInfo ); OperationHelper( partitionModelForDevice( device ), this );