diff --git a/.clang-format b/.clang-format index d512f71..ddab1f9 100644 --- a/.clang-format +++ b/.clang-format @@ -1,12 +1,12 @@ # Generated from CLion C/C++ Code Style settings BinPackParameters: false +BinPackArguments: false BasedOnStyle: LLVM AccessModifierOffset: -4 AlignAfterOpenBracket: Align AlignArrayOfStructures: Left AlignConsecutiveAssignments: Consecutive -AlignConsecutiveAssignments: None -AlignOperands: BreakBeforeBinaryOperators +AlignOperands: Align AllowAllArgumentsOnNextLine: false AllowAllConstructorInitializersOnNextLine: false AllowAllParametersOfDeclarationOnNextLine: false @@ -33,6 +33,7 @@ BraceWrapping: IndentBraces: false SplitEmptyFunction: false SplitEmptyRecord: true +AlwaysBreakBeforeMultilineStrings: true BreakBeforeBinaryOperators: All BreakBeforeTernaryOperators: true BreakConstructorInitializers: BeforeColon diff --git a/include/sled/futures/detail/delay.h b/include/sled/futures/detail/delay.h index bc6e8a1..5771953 100644 --- a/include/sled/futures/detail/delay.h +++ b/include/sled/futures/detail/delay.h @@ -46,7 +46,7 @@ struct DelayOperation { template struct DelaySender { - using result_t = typename S::result_t; + using result_t = typename S::result_t; using this_type = DelaySender; S sender; sled::TimeDelta delta; diff --git a/include/sled/futures/detail/future.h b/include/sled/futures/detail/future.h index 45be496..9d30a7c 100644 --- a/include/sled/futures/detail/future.h +++ b/include/sled/futures/detail/future.h @@ -55,7 +55,7 @@ struct FutureOperation { template struct FutureSender { - using result_t = T; + using result_t = T; using this_type = FutureSender; std::shared_ptr> state; diff --git a/include/sled/futures/detail/just.h b/include/sled/futures/detail/just.h index 2554bd9..4882c0a 100644 --- a/include/sled/futures/detail/just.h +++ b/include/sled/futures/detail/just.h @@ -19,7 +19,7 @@ struct JustOperation { template struct JustSender { - using result_t = T; + using result_t = T; using this_type = JustSender; T value; diff --git a/include/sled/futures/detail/on.h b/include/sled/futures/detail/on.h index cb07a18..0b9491f 100644 --- a/include/sled/futures/detail/on.h +++ b/include/sled/futures/detail/on.h @@ -66,7 +66,7 @@ struct OnOperation { template struct OnSender { - using result_t = typename S::result_t; + using result_t = typename S::result_t; using this_type = OnSender; S sender; F schedule; diff --git a/include/sled/futures/detail/retry.h b/include/sled/futures/detail/retry.h index 6ed8100..38a4195 100644 --- a/include/sled/futures/detail/retry.h +++ b/include/sled/futures/detail/retry.h @@ -16,7 +16,7 @@ struct RetryState { sled::Mutex mutex; sled::ConditionVariable cv; int retry_count = 0; - State state = kPending; + State state = kPending; }; }// namespace @@ -61,7 +61,7 @@ struct RetryReceiver { { sled::MutexLock lock(&state->mutex); if (stopped) { return; } - stopped = true; + stopped = true; state->state = RetryState::kDone; state->cv.NotifyAll(); } @@ -80,7 +80,7 @@ struct RetryOperation { { sled::MutexLock lock(&state->mutex); state->retry_count = retry_count; - state->state = RetryState::kPending; + state->state = RetryState::kPending; } do { op.Start(); @@ -96,7 +96,7 @@ struct RetryOperation { template struct RetrySender { - using result_t = typename S::result_t; + using result_t = typename S::result_t; using this_type = RetrySender; S sender; int retry_count; @@ -105,7 +105,7 @@ struct RetrySender { RetryOperation> Connect(R receiver) { auto state = std::make_shared(); - auto op = sender.Connect(RetryReceiver{state, receiver}); + auto op = sender.Connect(RetryReceiver{state, receiver}); return {retry_count, state, op}; } diff --git a/include/sled/futures/detail/then.h b/include/sled/futures/detail/then.h index b46b00b..f1faaac 100644 --- a/include/sled/futures/detail/then.h +++ b/include/sled/futures/detail/then.h @@ -49,7 +49,7 @@ struct ThenOperation { template struct ThenSender { - using result_t = invoke_result_t::result_t>; + using result_t = invoke_result_t::result_t>; using this_type = ThenSender; S sender; F func; diff --git a/include/sled/futures/detail/traits.h b/include/sled/futures/detail/traits.h index 868f0aa..8f42b3a 100644 --- a/include/sled/futures/detail/traits.h +++ b/include/sled/futures/detail/traits.h @@ -38,7 +38,7 @@ struct move_on_copy { move_on_copy(const move_on_copy &other) : value(std::move(other.value)) {} - move_on_copy(move_on_copy &&) = delete; + move_on_copy(move_on_copy &&) = delete; move_on_copy &operator=(const move_on_copy &) = delete; mutable type value;