Skip to content

Commit 25827fb

Browse files
committed
🤖 🎨 Fix code formatting for updated tools
Problem: - Files are not correctly formatted to pass the quality checks. Solution: - Format files with clang-format and black.
1 parent a32a762 commit 25827fb

7 files changed

Lines changed: 32 additions & 32 deletions

File tree

include/safe/array.hpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ template <typename T, std::size_t Size> struct array {
4040
return storage[pos.unsafe_value()];
4141
}
4242

43-
[[nodiscard]] constexpr auto
44-
at(var<size_type, ival<0, Size - 1>> pos) -> reference {
43+
[[nodiscard]] constexpr auto at(var<size_type, ival<0, Size - 1>> pos)
44+
-> reference {
4545
return storage[pos.unsafe_value()];
4646
}
4747

48-
[[nodiscard]] constexpr auto
49-
at(var<size_type, ival<0, Size - 1>> pos) const -> const_reference {
48+
[[nodiscard]] constexpr auto at(var<size_type, ival<0, Size - 1>> pos) const
49+
-> const_reference {
5050
return storage[pos.unsafe_value()];
5151
}
5252

@@ -152,14 +152,14 @@ template <std::size_t I, class T, std::size_t N>
152152
}
153153

154154
template <std::size_t I, class T, std::size_t N>
155-
[[nodiscard]] constexpr auto
156-
get(safe::array<T, N> const &a) noexcept -> T const & {
155+
[[nodiscard]] constexpr auto get(safe::array<T, N> const &a) noexcept
156+
-> T const & {
157157
return a[safe::constant<std::size_t, I>];
158158
}
159159

160160
template <std::size_t I, class T, std::size_t N>
161-
[[nodiscard]] constexpr auto
162-
get(safe::array<T, N> const &&a) noexcept -> T const && {
161+
[[nodiscard]] constexpr auto get(safe::array<T, N> const &&a) noexcept
162+
-> T const && {
163163
return a[safe::constant<std::size_t, I>];
164164
}
165165

include/safe/big_integer/detail/compare.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99
namespace safe::_big_integer::detail {
1010
template <std::size_t LhsNumBits, std::size_t RhsNumBits>
11-
[[nodiscard]] constexpr auto
12-
unsigned_compare(storage<LhsNumBits> const &lhs,
13-
storage<RhsNumBits> const &rhs) -> std::strong_ordering {
11+
[[nodiscard]] constexpr auto unsigned_compare(storage<LhsNumBits> const &lhs,
12+
storage<RhsNumBits> const &rhs)
13+
-> std::strong_ordering {
1414
for (auto i = std::max(lhs.num_elems, rhs.num_elems); i > std::size_t{};) {
1515
--i;
1616
auto const l = lhs.get(i);
@@ -26,9 +26,9 @@ unsigned_compare(storage<LhsNumBits> const &lhs,
2626
}
2727

2828
template <std::size_t LhsNumBits, std::size_t RhsNumBits>
29-
[[nodiscard]] constexpr auto
30-
operator<=>(storage<LhsNumBits> const &lhs,
31-
storage<RhsNumBits> const &rhs) -> std::strong_ordering {
29+
[[nodiscard]] constexpr auto operator<=>(storage<LhsNumBits> const &lhs,
30+
storage<RhsNumBits> const &rhs)
31+
-> std::strong_ordering {
3232
if (lhs.negative()) {
3333
if (rhs.negative()) {
3434
return unsigned_compare(lhs, rhs);

include/safe/big_integer/interface/big_integer.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ big_integer(detail::storage<NumBits>) -> big_integer<NumBits>;
159159
}
160160

161161
template <std::size_t LhsNumBits, std::size_t RhsNumBits>
162-
[[nodiscard]] constexpr auto
163-
operator==(big_integer<LhsNumBits> const &lhs,
164-
big_integer<RhsNumBits> const &rhs) -> bool {
162+
[[nodiscard]] constexpr auto operator==(big_integer<LhsNumBits> const &lhs,
163+
big_integer<RhsNumBits> const &rhs)
164+
-> bool {
165165
return lhs.unsafe_storage == rhs.unsafe_storage;
166166
}
167167

@@ -173,8 +173,8 @@ template <std::size_t LhsNumBits>
173173

174174
template <typename L, typename R>
175175
requires at_least_one_big_integer<L, R>
176-
[[nodiscard]] constexpr auto
177-
operator<=>(L const &raw_lhs, R const &raw_rhs) -> std::strong_ordering {
176+
[[nodiscard]] constexpr auto operator<=>(L const &raw_lhs, R const &raw_rhs)
177+
-> std::strong_ordering {
178178
auto lhs = detail::to_storage(raw_lhs);
179179
auto rhs = detail::to_storage(raw_rhs);
180180
return lhs <=> rhs;

include/safe/dsl/detail/triint.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ template <typename T> struct triint {
2525
};
2626

2727
template <typename LhsT, typename RhsT>
28-
[[nodiscard]] constexpr auto operator==(triint<LhsT> lhs,
29-
triint<RhsT> rhs) -> bool {
28+
[[nodiscard]] constexpr auto operator==(triint<LhsT> lhs, triint<RhsT> rhs)
29+
-> bool {
3030
return (lhs.var_bits() == rhs.var_bits()) &&
3131
(lhs.const_bits() == rhs.const_bits());
3232
}
@@ -63,14 +63,14 @@ template <typename U>
6363
}
6464

6565
template <typename U>
66-
[[nodiscard]] constexpr auto operator<<(triint<U> val,
67-
auto shamt) -> triint<U> {
66+
[[nodiscard]] constexpr auto operator<<(triint<U> val, auto shamt)
67+
-> triint<U> {
6868
return {val.var_bits() << shamt, val.const_bits() << shamt};
6969
}
7070

7171
template <typename U>
72-
[[nodiscard]] constexpr auto operator>>(triint<U> val,
73-
auto shamt) -> triint<U> {
72+
[[nodiscard]] constexpr auto operator>>(triint<U> val, auto shamt)
73+
-> triint<U> {
7474
return {val.var_bits() >> shamt, val.const_bits() >> shamt};
7575
}
7676

include/safe/dsl/intersection.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ template <typename... Intervals> struct intersection_t : public detail::set_op {
88
};
99

1010
template <Operand LhsT, Operand RhsT>
11-
[[nodiscard]] constexpr auto operator&&(LhsT,
12-
RhsT) -> intersection_t<LhsT, RhsT> {
11+
[[nodiscard]] constexpr auto operator&&(LhsT, RhsT)
12+
-> intersection_t<LhsT, RhsT> {
1313
return {};
1414
}
1515
} // namespace safe::dsl

include/safe/var.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ template <typename... Ts> constexpr bool at_least_one_var = (... or Var<Ts>);
8888
}
8989

9090
template <typename T, T v>
91-
[[nodiscard]] SAFE_INLINE constexpr auto
92-
to_var(std::integral_constant<T, v>) -> Var auto {
91+
[[nodiscard]] SAFE_INLINE constexpr auto to_var(std::integral_constant<T, v>)
92+
-> Var auto {
9393
return detail::make_constant<T, v>();
9494
}
9595

@@ -196,8 +196,8 @@ template <var_admissable L, var_admissable R>
196196

197197
template <var_admissable L, var_admissable R>
198198
requires(at_least_one_var<L, R>)
199-
[[nodiscard]] SAFE_INLINE constexpr auto operator==(L raw_lhs,
200-
R raw_rhs) -> bool {
199+
[[nodiscard]] SAFE_INLINE constexpr auto operator==(L raw_lhs, R raw_rhs)
200+
-> bool {
201201
return to_var(raw_lhs).unsafe_value() == to_var(raw_rhs).unsafe_value();
202202
}
203203

tools/gen_release_header.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ def process(base_filepath):
5858
# system headers, write those out before proceeding with the remaining content
5959
print("".join(content_lines[:insert_system_headers_line]))
6060
print("".join(sorted(system_headers)))
61-
print("".join(content_lines[insert_system_headers_line:]))
61+
print("".join(content_lines[insert_system_headers_line:]))

0 commit comments

Comments
 (0)