Skip to content

Commit e13f68c

Browse files
committed
add clang-format version print
1 parent a639c31 commit e13f68c

File tree

7 files changed

+24
-24
lines changed

7 files changed

+24
-24
lines changed

.github/workflows/clang-format.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ jobs:
1010
- uses: actions/checkout@v4
1111
- name: Analyze
1212
run: |
13+
clang-format --version
1314
clang-format --dry-run --Werror -style=file $(find ./ -name '*.cc' -print)
1415
clang-format --dry-run --Werror -style=file $(find ./ -name '*.hh' -print)

include/reactor-cpp/connection.hh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ public:
143143
};
144144
}
145145

146-
auto acquire_tag(const Tag& tag, std::unique_lock<std::mutex>& lock, const std::function<bool(void)>& abort_waiting)
147-
-> bool override {
146+
auto acquire_tag(const Tag& tag, std::unique_lock<std::mutex>& lock,
147+
const std::function<bool(void)>& abort_waiting) -> bool override {
148148
reactor_assert(lock.owns_lock());
149149
log_.debug() << "downstream tries to acquire tag " << tag;
150150

@@ -210,8 +210,8 @@ public:
210210
};
211211
}
212212

213-
auto acquire_tag(const Tag& tag, std::unique_lock<std::mutex>& lock, const std::function<bool(void)>& abort_waiting)
214-
-> bool override {
213+
auto acquire_tag(const Tag& tag, std::unique_lock<std::mutex>& lock,
214+
const std::function<bool(void)>& abort_waiting) -> bool override {
215215
// Since this is a delayed connection, we can go back in time and need to
216216
// acquire the latest upstream tag that can create an event at the given
217217
// tag. We also need to consider that given a delay d and a tag g=(t, n),
@@ -240,8 +240,8 @@ public:
240240
};
241241
}
242242

243-
auto acquire_tag(const Tag& tag, std::unique_lock<std::mutex>& lock, const std::function<bool(void)>& abort_waiting)
244-
-> bool override {
243+
auto acquire_tag(const Tag& tag, std::unique_lock<std::mutex>& lock,
244+
const std::function<bool(void)>& abort_waiting) -> bool override {
245245
this->log_.debug() << "downstream tries to acquire tag " << tag;
246246
return PhysicalTimeBarrier::acquire_tag(tag, lock, this->environment()->scheduler(), abort_waiting);
247247
}

include/reactor-cpp/multiport.hh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ protected:
5151

5252
public:
5353
explicit BaseMultiport(std::string name)
54-
: multiport_name_(std::move(name)){};
54+
: multiport_name_(std::move(name)) {}
5555
~BaseMultiport() = default;
5656
[[nodiscard]] auto name() const -> std::string { return multiport_name_; }
5757
};
@@ -73,7 +73,7 @@ public:
7373
using const_iterator = typename std::vector<T>::const_iterator;
7474

7575
explicit Multiport(const std::string& name) noexcept
76-
: BaseMultiport(name){};
76+
: BaseMultiport(name) {}
7777
~Multiport() noexcept = default;
7878

7979
auto operator==(const Multiport& other) const noexcept -> bool {

include/reactor-cpp/mutations/bank.hh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ public:
3030
, desired_size_(other.desired_size_)
3131
, size_before_application_(other.size_before_application_)
3232
, reactor_(other.reactor_)
33-
, create_lambda_(other.create_lambda_){};
33+
, create_lambda_(other.create_lambda_) {}
3434
MutationChangeBankSize(MutationChangeBankSize&& other) noexcept
3535
: bank_(other.bank_)
3636
, desired_size_(other.desired_size_)
3737
, size_before_application_(other.size_before_application_)
3838
, reactor_(other.reactor_)
39-
, create_lambda_(other.create_lambda_){};
39+
, create_lambda_(other.create_lambda_) {}
4040
explicit MutationChangeBankSize(std::vector<T>* bank, Reactor* reactor, std::size_t size,
4141
std::function<T(Reactor* parent_reactor, std::size_t index)> create_lambda);
4242
~MutationChangeBankSize() override = default;

include/reactor-cpp/port.hh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,7 @@ public:
7676
void register_antidependency(Reaction* reaction) noexcept;
7777
void set_inward_binding(BasePort* port) noexcept {
7878
if (port != nullptr) {
79-
std::cout << port->fqn() << "(" << port << ")"
80-
<< " --> " << this->fqn() << "(" << this << ")" << '\n';
79+
std::cout << port->fqn() << "(" << port << ")" << " --> " << this->fqn() << "(" << this << ")" << '\n';
8180
}
8281

8382
inward_binding_ = port;

include/reactor-cpp/time_barrier.hh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ public:
8080
// The caller must hold a lock on the scheduler mutex
8181
auto try_acquire_tag(const Tag& tag) { return tag <= released_time_; }
8282

83-
auto acquire_tag(const Tag& tag, std::unique_lock<std::mutex>& lock, const std::function<bool(void)>& abort_waiting)
84-
-> bool {
83+
auto acquire_tag(const Tag& tag, std::unique_lock<std::mutex>& lock,
84+
const std::function<bool(void)>& abort_waiting) -> bool {
8585
if (try_acquire_tag(tag)) {
8686
return true;
8787
}

include/reactor-cpp/value_ptr.hh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -517,23 +517,23 @@ public:
517517
// Comparison operators
518518

519519
template <class T, class U, bool is_trivial>
520-
auto operator==(const MutableValuePtr<T, is_trivial>& ptr1, const MutableValuePtr<U, is_trivial>& ptr2) noexcept
521-
-> bool {
520+
auto operator==(const MutableValuePtr<T, is_trivial>& ptr1,
521+
const MutableValuePtr<U, is_trivial>& ptr2) noexcept -> bool {
522522
return ptr1.get() == ptr2.get();
523523
}
524524
template <class T, class U, bool is_trivial>
525-
auto operator==(const ImmutableValuePtr<T, is_trivial>& ptr1, const ImmutableValuePtr<U, is_trivial>& ptr2) noexcept
526-
-> bool {
525+
auto operator==(const ImmutableValuePtr<T, is_trivial>& ptr1,
526+
const ImmutableValuePtr<U, is_trivial>& ptr2) noexcept -> bool {
527527
return ptr1.get() == ptr2.get();
528528
}
529529
template <class T, class U, bool is_trivial>
530-
auto operator==(const ImmutableValuePtr<T, is_trivial>& ptr1, const MutableValuePtr<U, is_trivial>& ptr2) noexcept
531-
-> bool {
530+
auto operator==(const ImmutableValuePtr<T, is_trivial>& ptr1,
531+
const MutableValuePtr<U, is_trivial>& ptr2) noexcept -> bool {
532532
return ptr1.get() == ptr2.get();
533533
}
534534
template <class T, class U, bool is_trivial>
535-
auto operator==(const MutableValuePtr<T, is_trivial>& ptr1, const ImmutableValuePtr<U, is_trivial>& ptr2) noexcept
536-
-> bool {
535+
auto operator==(const MutableValuePtr<T, is_trivial>& ptr1,
536+
const ImmutableValuePtr<U, is_trivial>& ptr2) noexcept -> bool {
537537
return ptr1.get() == ptr2.get();
538538
}
539539
template <class T, bool is_trivial>
@@ -554,8 +554,8 @@ auto operator==(std::nullptr_t, const ImmutableValuePtr<T, is_trivial>& ptr1) no
554554
}
555555

556556
template <class T, class U, bool is_trivial>
557-
auto operator!=(const MutableValuePtr<T, is_trivial>& ptr1, const MutableValuePtr<U, is_trivial>& ptr2) noexcept
558-
-> bool {
557+
auto operator!=(const MutableValuePtr<T, is_trivial>& ptr1,
558+
const MutableValuePtr<U, is_trivial>& ptr2) noexcept -> bool {
559559
return ptr1.get() != ptr2.get();
560560
}
561561

0 commit comments

Comments
 (0)