[partition] Simplify negative logic

- Instead of multiple continue statements to avoid negative cases,
   state the one positive case instead.
This commit is contained in:
Adriaan de Groot 2019-05-31 11:37:14 +02:00
parent 3bdbfe6bff
commit d5f0bdd28c

View File

@ -947,12 +947,7 @@ PartitionCoreModule::revertDevice( Device* dev, bool individualRevert )
QList< Device* > devices; QList< Device* > devices;
for ( DeviceInfo* const info : m_deviceInfos ) for ( DeviceInfo* const info : m_deviceInfos )
{ {
// device is a QScopedPointer if ( info && !info->device.isNull() && info->device->type() == Device::Type::Disk_Device )
if ( !info || info->device.isNull() )
continue;
if ( info->device->type() != Device::Type::Disk_Device )
continue;
else
devices.append( info->device.data() ); devices.append( info->device.data() );
} }