Skip to content

Commit

Permalink
Linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmoreno committed Dec 25, 2023
1 parent 3f92097 commit 426ada2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
10 changes: 5 additions & 5 deletions include/rtpmidid/rtppeer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,15 @@ struct fmt::formatter<rtpmidid::rtppeer_t::status_e>
name = "CONNECTED";
break;
}
return formatter<std::string_view>::format(name, ctx);
return formatter<std::string_view>::format(name, ctx); // NOLINT
}
};

template <>
struct fmt::formatter<rtpmidid::rtppeer_t::port_e>
: formatter<std::string_view> {
auto format(rtpmidid::rtppeer_t::port_e c, format_context &ctx) {
const char *name = "UNKNOWN";
const char *name = "UNKNOWN"; // NOLINT
switch (c) {
case rtpmidid::rtppeer_t::port_e::MIDI_PORT:
name = "MIDI_PORT";
Expand All @@ -185,15 +185,15 @@ struct fmt::formatter<rtpmidid::rtppeer_t::port_e>
name = "CONTROL_PORT";
break;
}
return formatter<std::string_view>::format(name, ctx);
return formatter<std::string_view>::format(name, ctx); // NOLINT
}
};

template <>
struct fmt::formatter<rtpmidid::rtppeer_t::disconnect_reason_e>
: formatter<std::string_view> {
auto format(rtpmidid::rtppeer_t::disconnect_reason_e c, format_context &ctx) {
const char *name = "UNKNOWN";
const char *name = "UNKNOWN"; // NOLINT
switch (c) {
case rtpmidid::rtppeer_t::disconnect_reason_e::CANT_CONNECT:
name = "CANT_CONNECT";
Expand All @@ -217,6 +217,6 @@ struct fmt::formatter<rtpmidid::rtppeer_t::disconnect_reason_e>
name = "NETWORK_ERROR";
break;
}
return formatter<std::string_view>::format(name, ctx);
return formatter<std::string_view>::format(name, ctx); // NOLINT
}
};
2 changes: 1 addition & 1 deletion include/rtpmidid/signal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ template <typename... Args> class signal_t {
if (this->slots->find(f.first) == this->slots->end())
continue; // this element was removed while looping, do not call
DEBUG0("{}::signal_t::() calling {}", (void *)this, f.first);
f.second(std::forward<Args>(args)...);
f.second(args...);
DEBUG0("{}::signal_t::() called {}", (void *)this, f.first);
}
DEBUG0("{}::signal_t::() END", (void *)this);
Expand Down
3 changes: 1 addition & 2 deletions src/aseq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ aseq_t::~aseq_t() {
*/
void aseq_t::read_ready() {
snd_seq_event_t *ev;
int pending;
while ((pending = snd_seq_event_input(seq, &ev)) > 0) {
while (snd_seq_event_input(seq, &ev) > 0) {
// DEBUG("ALSA MIDI event: {}, pending: {} / {}", ev->type, pending,
// snd_seq_event_input_pending(seq, 0));

Expand Down
1 change: 0 additions & 1 deletion src/control_socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ void control_socket_t::data_ready(int fd) {
ERROR(
"Could not send msg too long to control socket! Closing connection.");
::close(fd);
fd = -1;
}
return;
}
Expand Down

0 comments on commit 426ada2

Please sign in to comment.