From 8b41a7166819389978252fb32a8a2d1ccd7453c2 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 7 Apr 2020 21:38:15 +0200 Subject: [PATCH] [partition] Apply coding style to core/ --- src/modules/partition/core/PartitionCoreModule.cpp | 13 ++++++++----- src/modules/partition/core/PartitionLayout.cpp | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/modules/partition/core/PartitionCoreModule.cpp b/src/modules/partition/core/PartitionCoreModule.cpp index 764c241ec..aee1ab10f 100644 --- a/src/modules/partition/core/PartitionCoreModule.cpp +++ b/src/modules/partition/core/PartitionCoreModule.cpp @@ -920,13 +920,16 @@ PartitionCoreModule::layoutApply( Device* dev, // TODO: perhaps the partition that holds the bootloader? const QString boot = QStringLiteral( "/boot" ); const QString root = QStringLiteral( "/" ); - const auto is_boot = [&](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 auto is_boot + = [&]( 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(); - for( Partition* part : partList ) + const bool separate_boot_partition + = std::find_if( partList.constBegin(), partList.constEnd(), is_boot ) != partList.constEnd(); + 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 ) ) ) { createPartition( dev, part, part->activeFlags() | ( isEfi ? KPM_PARTITION_FLAG( None ) : KPM_PARTITION_FLAG( Boot ) ) ); diff --git a/src/modules/partition/core/PartitionLayout.cpp b/src/modules/partition/core/PartitionLayout.cpp index 378833f4d..33d2a7679 100644 --- a/src/modules/partition/core/PartitionLayout.cpp +++ b/src/modules/partition/core/PartitionLayout.cpp @@ -257,7 +257,7 @@ PartitionLayout::execute( Device* dev, #if defined( WITH_KPMCORE42API ) for ( const auto& k : part.partFeatures.keys() ) { - currentPartition->fileSystem().addFeature( k, part.partFeatures.value(k) ); + currentPartition->fileSystem().addFeature( k, part.partFeatures.value( k ) ); } #else cWarning() << "Ignoring features; requires KPMcore >= 4.2.0.";