Skip to content

Commit

Permalink
Update clang-format on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Neverlord committed Nov 6, 2024
1 parent 2a6e620 commit e09002e
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
#
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: 'v18.1.8'
rev: 'v19.1.3'
hooks:
- id: clang-format
4 changes: 2 additions & 2 deletions bindings/python/_broker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ PYBIND11_MODULE(_broker, m) {
"StatusSubscriber");
status_subscriber
.def("get",
(broker::status_subscriber::value_type(broker::status_subscriber::*)())
& broker::status_subscriber::get)
(broker::status_subscriber::value_type(
broker::status_subscriber::*)()) &broker::status_subscriber::get)
.def("get",
[](broker::status_subscriber& ep, double secs)
-> std::optional<broker::status_subscriber::value_type> {
Expand Down
8 changes: 4 additions & 4 deletions libbroker/broker/alm/multipath.hh
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ private:
};

template <class T, class U>
auto operator==(node_iterator<T> x,
node_iterator<U> y) -> decltype(x.get() == y.get()) {
auto operator==(node_iterator<T> x, node_iterator<U> y)
-> decltype(x.get() == y.get()) {
return x.get() == y.get();
}

template <class T, class U>
auto operator!=(node_iterator<T> x,
node_iterator<U> y) -> decltype(x.get() != y.get()) {
auto operator!=(node_iterator<T> x, node_iterator<U> y)
-> decltype(x.get() != y.get()) {
return x.get() != y.get();
}

Expand Down
16 changes: 8 additions & 8 deletions libbroker/broker/detail/type_traits.hh
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ inline constexpr bool are_same_v = are_same<Ts...>::value;
template <class From, class To>
struct has_convert {
template <class T>
static auto test(const T* x) -> decltype(convert(*x, std::declval<To&>()),
std::true_type());
static auto test(const T* x)
-> decltype(convert(*x, std::declval<To&>()), std::true_type());

template <class T>
static auto test(...) -> std::false_type;
Expand Down Expand Up @@ -264,9 +264,9 @@ inline constexpr bool is_tuple = is_tuple_oracle<T>::value;
class has_encode_overload { \
private: \
template <class U> \
static auto \
sfinae(U& y) -> decltype(::ns_name::encode(y, std::declval<OutIter&>()), \
std::true_type{}); \
static auto sfinae(U& y) \
-> decltype(::ns_name::encode(y, std::declval<OutIter&>()), \
std::true_type{}); \
static std::false_type sfinae(...); \
using result_type = decltype(sfinae(std::declval<T&>())); \
\
Expand All @@ -282,9 +282,9 @@ inline constexpr bool is_tuple = is_tuple_oracle<T>::value;
class has_decode_overload { \
private: \
template <class U> \
static auto \
sfinae(U& y) -> decltype(::ns_name::decode(y, std::declval<OutIter&>()), \
std::true_type{}); \
static auto sfinae(U& y) \
-> decltype(::ns_name::decode(y, std::declval<OutIter&>()), \
std::true_type{}); \
static std::false_type sfinae(...); \
using result_type = decltype(sfinae(std::declval<T&>())); \
\
Expand Down
8 changes: 4 additions & 4 deletions libbroker/broker/expected.hh
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ private:

/// @relates expected
template <class T>
auto operator==(const expected<T>& x,
const expected<T>& y) -> decltype(*x == *y) {
auto operator==(const expected<T>& x, const expected<T>& y)
-> decltype(*x == *y) {
return x && y ? *x == *y : (!x && !y ? x.error() == y.error() : false);
}

Expand Down Expand Up @@ -290,8 +290,8 @@ bool operator==(ec x, const expected<T>& y) {

/// @relates expected
template <class T>
auto operator!=(const expected<T>& x,
const expected<T>& y) -> decltype(*x == *y) {
auto operator!=(const expected<T>& x, const expected<T>& y)
-> decltype(*x == *y) {
return !(x == y);
}

Expand Down
8 changes: 4 additions & 4 deletions libbroker/broker/intrusive_ptr.hh
Original file line number Diff line number Diff line change
Expand Up @@ -224,15 +224,15 @@ bool operator!=(const T* x, const intrusive_ptr<T>& y) {

/// @relates intrusive_ptr
template <class T, class U>
auto operator==(const intrusive_ptr<T>& x,
const intrusive_ptr<U>& y) -> decltype(x.get() == y.get()) {
auto operator==(const intrusive_ptr<T>& x, const intrusive_ptr<U>& y)
-> decltype(x.get() == y.get()) {
return x.get() == y.get();
}

/// @relates intrusive_ptr
template <class T, class U>
auto operator!=(const intrusive_ptr<T>& x,
const intrusive_ptr<U>& y) -> decltype(x.get() != y.get()) {
auto operator!=(const intrusive_ptr<T>& x, const intrusive_ptr<U>& y)
-> decltype(x.get() != y.get()) {
return x.get() != y.get();
}

Expand Down
6 changes: 3 additions & 3 deletions tests/benchmarks/routing-table/routing-table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,9 @@ class routing_table : public benchmark::Fixture {
};
for (size_t index = 0; index < 10; ++index)
fill_tbl(topologies[index], g, {}, 0, index, on_new_node);
// for (size_t index = 0; index < 10; ++index)
// fill_tbl(v2_topologies[index], g, {}, 0, index, [](auto&&...) {});
// Sanity checking
// for (size_t index = 0; index < 10; ++index)
// fill_tbl(v2_topologies[index], g, {}, 0, index, [](auto&&...) {});
// Sanity checking
#ifndef NDEBUG
for (size_t index = 0; index < 10; ++index)
assert(ids[index].size() == (1 << (index + 1)));
Expand Down

0 comments on commit e09002e

Please sign in to comment.