[partition] Apply coding style to core/

This commit is contained in:
Adriaan de Groot 2020-04-07 21:38:15 +02:00
parent eb6270982f
commit 8b41a71668
2 changed files with 9 additions and 6 deletions

View File

@ -920,10 +920,13 @@ PartitionCoreModule::layoutApply( Device* dev,
// TODO: perhaps the partition that holds the bootloader? // TODO: perhaps the partition that holds the bootloader?
const QString boot = QStringLiteral( "/boot" ); const QString boot = QStringLiteral( "/boot" );
const QString root = QStringLiteral( "/" ); const QString root = QStringLiteral( "/" );
const auto is_boot = [&](Partition*p) -> bool {return PartitionInfo::mountPoint(p) == boot || p->mountPoint() == boot;}; const auto is_boot
const auto is_root = [&](Partition*p) -> bool {return PartitionInfo::mountPoint(p) == root || p->mountPoint() == root;}; = [&]( Partition* p ) -> bool { return PartitionInfo::mountPoint( p ) == boot || p->mountPoint() == boot; };
const auto is_root
= [&]( Partition* p ) -> bool { return PartitionInfo::mountPoint( p ) == root || p->mountPoint() == root; };
const bool separate_boot_partition = std::find_if(partList.constBegin(), partList.constEnd(), is_boot) != partList.constEnd(); const bool separate_boot_partition
= std::find_if( partList.constBegin(), partList.constEnd(), is_boot ) != partList.constEnd();
for ( Partition* part : partList ) for ( Partition* part : partList )
{ {
if ( ( separate_boot_partition && is_boot( part ) ) || ( !separate_boot_partition && is_root( part ) ) ) if ( ( separate_boot_partition && is_boot( part ) ) || ( !separate_boot_partition && is_root( part ) ) )