Commit d70d3a51 authored by Dominik Charousset's avatar Dominik Charousset

Merge branch 'topic/neverlord/clang-warnings'

parents 9e921a91 1c1de32a
......@@ -257,7 +257,7 @@ void client_repl(actor_system& system, const config& cfg) {
cout << R"(")" << arg2 << R"(" > )"
<< std::numeric_limits<uint16_t>::max() << endl;
else
anon_send(client, connect_atom_v, move(arg1),
anon_send(client, connect_atom_v, std::move(arg1),
static_cast<uint16_t>(lport));
} else {
auto x = toint(arg0);
......
......@@ -26,9 +26,8 @@ struct select_any_factory<F, type_list<Ts...>> {
template <class Fun>
static auto
make(std::shared_ptr<size_t> pending, disposable timeouts, Fun f) {
using std::move;
return [pending{move(pending)}, timeouts{move(timeouts)},
f{move(f)}](Ts... xs) mutable {
return [pending{std::move(pending)}, timeouts{std::move(timeouts)},
f{std::move(f)}](Ts... xs) mutable {
CAF_LOG_TRACE(CAF_ARG2("pending", *pending));
if (*pending > 0) {
timeouts.dispose();
......
......@@ -286,8 +286,8 @@ public:
template <class F>
std::enable_if_t<std::is_invocable_r_v<skippable_result, F, message&>>
set_default_handler(F fun) {
using std::move;
default_handler_ = [fn{move(fun)}](scheduled_actor*, message& xs) mutable {
default_handler_ = [fn{std::move(fun)}](scheduled_actor*,
message& xs) mutable {
return fn(xs);
};
}
......@@ -319,10 +319,8 @@ public:
/// Sets a custom handler for down messages.
template <class F>
std::enable_if_t<std::is_invocable_v<F, down_msg&>> set_down_handler(F fun) {
using std::move;
down_handler_ = [fn{move(fun)}](scheduled_actor*, down_msg& x) mutable {
fn(x);
};
down_handler_ = [fn{std::move(fun)}](scheduled_actor*,
down_msg& x) mutable { fn(x); };
}
/// Sets a custom handler for node down messages.
......@@ -354,10 +352,8 @@ public:
/// Sets a custom handler for exit messages.
template <class F>
std::enable_if_t<std::is_invocable_v<F, exit_msg&>> set_exit_handler(F fun) {
using std::move;
exit_handler_ = [fn{move(fun)}](scheduled_actor*, exit_msg& x) mutable {
fn(x);
};
exit_handler_ = [fn{std::move(fun)}](scheduled_actor*,
exit_msg& x) mutable { fn(x); };
}
#ifdef CAF_ENABLE_EXCEPTIONS
......
......@@ -13,7 +13,6 @@
#include "caf/error.hpp"
#include "caf/expected.hpp"
using std::move;
using std::string;
namespace caf {
......
......@@ -56,7 +56,7 @@ public:
/// @warning Must not be modified outside the IO multiplexers event loop
/// once the stream has been started.
void enqueue_datagram(datagram_handle hdl, byte_buffer buf) {
wr_offline_buf_.emplace_back(hdl, move(buf));
wr_offline_buf_.emplace_back(hdl, std::move(buf));
}
/// Returns the read buffer of this stream.
......
......@@ -160,7 +160,7 @@ struct fixture {
}
void exec_loop() {
while (exec_one(client_side) | exec_one(server_side))
while (exec_one(client_side) || exec_one(server_side))
; // nop
}
......
......@@ -616,7 +616,6 @@ void second_pass(blocking_actor* self, const group& grp,
CAF_RAISE_ERROR("logger ID not found");
};
// additional state for second pass
size_t line = 0;
log_entry plain_entry;
std::vector<se_event> in_flight_messages;
std::vector<se_event> in_flight_spawns;
......@@ -654,7 +653,6 @@ void second_pass(blocking_actor* self, const group& grp,
};
// second pass
while (in >> plain_entry) {
++line;
// increment local time
auto& st = state(plain_entry.id);
// do not produce log output for internal actors but still track messages
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment