Coding style fixes

This commit is contained in:
Aurélien Gâteau 2014-07-16 10:36:17 +02:00
parent 27b28a5bd1
commit d500c7b480
2 changed files with 6 additions and 3 deletions

View file

@ -96,12 +96,15 @@ CreatePartitionDialog::createPartitionInfo()
qint64 lastSector; qint64 lastSector;
int mbSize = m_ui->sizeSpinBox->value(); int mbSize = m_ui->sizeSpinBox->value();
if ( mbSize == m_ui->sizeSpinBox->maximum() ) { if ( mbSize == m_ui->sizeSpinBox->maximum() )
{
// If we are at the maximum value, select the last sector to avoid // If we are at the maximum value, select the last sector to avoid
// potential rounding errors which could leave a few sectors at the end // potential rounding errors which could leave a few sectors at the end
// unused // unused
lastSector = m_maxSector; lastSector = m_maxSector;
} else { }
else
{
lastSector = m_minSector + qint64( mbSize ) * 1024 * 1024 / m_device->logicalSectorSize(); lastSector = m_minSector + qint64( mbSize ) * 1024 * 1024 / m_device->logicalSectorSize();
Q_ASSERT( lastSector <= m_maxSector ); Q_ASSERT( lastSector <= m_maxSector );
if ( lastSector > m_maxSector ) if ( lastSector > m_maxSector )

View file

@ -142,7 +142,7 @@ PartitionInfo*
PartitionModel::partitionInfoForIndex( const QModelIndex& index ) const PartitionModel::partitionInfoForIndex( const QModelIndex& index ) const
{ {
Partition* partition = partitionForIndex( index ); Partition* partition = partitionForIndex( index );
if (!partition ) if ( !partition )
return nullptr; return nullptr;
return m_infoProvider->infoForPartition( partition ); return m_infoProvider->infoForPartition( partition );
} }