Skip to content

Commit

Permalink
*: Run 'pw format --fix --full'
Browse files Browse the repository at this point in the history
Change-Id: Iba40e15aabea2ef66f82d86b07f651c47bdbdf46
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/146971
Reviewed-by: Prabhu Karthikeyan Rajasekaran <[email protected]>
Presubmit-Verified: CQ Bot Account <[email protected]>
Commit-Queue: Auto-Submit <[email protected]>
Pigweed-Auto-Submit: Rob Mohr <[email protected]>
  • Loading branch information
mohrr authored and CQ Bot Account committed May 13, 2023
1 parent 5122f29 commit 85fd87b
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 17 deletions.
17 changes: 9 additions & 8 deletions pw_alignment/public/pw_alignment/alignment.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,15 @@ constexpr size_t bit_ceil(size_t x) noexcept {
// The NaturallyAligned class is a wrapper class for ensuring the object is
// aligned to a power of 2 bytes greater than or equal to its size.
template <typename T>
struct [[gnu::aligned(bit_ceil(sizeof(T)))]] NaturallyAligned
: public T{NaturallyAligned() : T(){} NaturallyAligned(const T& t) :
T(t){} template <class U>
NaturallyAligned(const U& u) : T(u){} NaturallyAligned
operator=(T other){return T::operator=(other);
} // namespace pw
}
;
struct [[gnu::aligned(bit_ceil(sizeof(T)))]] NaturallyAligned : public T {
NaturallyAligned() : T() {}
NaturallyAligned(const T& t) : T(t) {}
template <class U>
NaturallyAligned(const U& u) : T(u) {}
NaturallyAligned operator=(T other) {
return T::operator=(other);
} // namespace pw
};

// This is a convenience wrapper for ensuring the object held by std::atomic is
// naturally aligned. Ensuring the underlying objects's alignment is natural
Expand Down
4 changes: 2 additions & 2 deletions pw_log_tokenized/log_tokenized_test_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ void pw_log_tokenized_Test_LogMetadata_LevelTooLarge_Clamps(void) {
}

void pw_log_tokenized_Test_LogMetadata_TooManyFlags_Truncates(void) {
// clang-format off
// clang-format off
#line 1100
PW_LOG_TOKENIZED_TO_GLOBAL_HANDLER_WITH_PAYLOAD(1, PW_LOG_MODULE_NAME, 0xFFFFFFFF, "hello");
// clang-format on
}

void pw_log_tokenized_Test_LogMetadata_LogMetadata_VariousValues(void) {
// clang-format off
// clang-format off
#line 1200
PW_LOG_TOKENIZED_TO_GLOBAL_HANDLER_WITH_PAYLOAD(6, PW_LOG_MODULE_NAME, 3, "hello%s", "?");
// clang-format on
Expand Down
2 changes: 1 addition & 1 deletion pw_minimal_cpp_stdlib/public/internal/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ _PW_POLYFILL_BEGIN_NAMESPACE_STD

template <typename T>
constexpr remove_reference_t<T>&& move(T&& object) {
return (remove_reference_t<T> &&) object;
return (remove_reference_t<T>&&)object;
}

// Forward declare these classes, which are specialized in other headers.
Expand Down
4 changes: 2 additions & 2 deletions pw_result/public/pw_result/internal/expected_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -767,8 +767,8 @@ class expected<T, E, std::enable_if_t<std::is_void_v<T>>> {
return *this;
}
constexpr expected& operator=(expected&& rhs) noexcept(
std::is_nothrow_move_constructible_v<E>&&
std::is_nothrow_move_assignable_v<E>) {
std::is_nothrow_move_constructible_v<E> &&
std::is_nothrow_move_assignable_v<E>) {
error_contents_ = std::move(rhs.error_contents);
return *this;
}
Expand Down
8 changes: 4 additions & 4 deletions pw_result/public/pw_result/internal/result_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ struct MoveCtorBase<T, false> {
};

template <typename T,
bool = std::is_copy_constructible<T>::value&&
std::is_copy_assignable<T>::value>
bool = std::is_copy_constructible<T>::value &&
std::is_copy_assignable<T>::value>
struct CopyAssignBase {
CopyAssignBase() = default;
CopyAssignBase(const CopyAssignBase&) = default;
Expand All @@ -369,8 +369,8 @@ struct CopyAssignBase<T, false> {
};

template <typename T,
bool = std::is_move_constructible<T>::value&&
std::is_move_assignable<T>::value>
bool = std::is_move_constructible<T>::value &&
std::is_move_assignable<T>::value>
struct MoveAssignBase {
MoveAssignBase() = default;
MoveAssignBase(const MoveAssignBase&) = default;
Expand Down

0 comments on commit 85fd87b

Please sign in to comment.