From 2b4ffb2bd354f4c3c2e239d55bcd82fc12391f3c Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 20 Jun 2019 14:30:49 +0200 Subject: [PATCH] [libcalamares] Polish coding-style - don't break after return type in declarations - apply same to partition service --- .clang-format | 2 +- src/libcalamares/partition/PartitionSize.h | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.clang-format b/.clang-format index f059f2fde..997ad379b 100644 --- a/.clang-format +++ b/.clang-format @@ -6,7 +6,7 @@ AllowAllParametersOfDeclarationOnNextLine: 'false' AllowShortFunctionsOnASingleLine: Inline AllowShortIfStatementsOnASingleLine: 'false' AllowShortLoopsOnASingleLine: 'false' -AlwaysBreakAfterDefinitionReturnType: All +AlwaysBreakAfterReturnType: TopLevelDefinitions AlwaysBreakTemplateDeclarations: Yes BinPackArguments: 'false' BinPackParameters: 'false' diff --git a/src/libcalamares/partition/PartitionSize.h b/src/libcalamares/partition/PartitionSize.h index 27f354516..44cedbffe 100644 --- a/src/libcalamares/partition/PartitionSize.h +++ b/src/libcalamares/partition/PartitionSize.h @@ -60,11 +60,7 @@ public: } PartitionSize( const QString& ); - bool - isValid() const - { - return ( unit() != SizeUnit::None ) && ( value() > 0 ); - } + bool isValid() const { return ( unit() != SizeUnit::None ) && ( value() > 0 ); } bool operator<( const PartitionSize& other ) const; bool operator>( const PartitionSize& other ) const; @@ -114,8 +110,7 @@ public: * be compared with each other, and all the explicit sizes (KiB, ...) * can be compared with each other. */ - static constexpr bool - unitsComparable( const SizeUnit u1, const SizeUnit u2 ) + static constexpr bool unitsComparable( const SizeUnit u1, const SizeUnit u2 ) { return !( ( u1 == SizeUnit::None || u2 == SizeUnit::None ) || ( u1 == SizeUnit::Percent && u2 != SizeUnit::Percent )