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;
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
// potential rounding errors which could leave a few sectors at the end
// unused
lastSector = m_maxSector;
} else {
}
else
{
lastSector = m_minSector + qint64( mbSize ) * 1024 * 1024 / m_device->logicalSectorSize();
Q_ASSERT( lastSector <= m_maxSector );
if ( lastSector > m_maxSector )

View File

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