From ccb4ee098f0416ab47a46650705dba6495e8bec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Fri, 7 Apr 2017 18:53:12 +0200 Subject: Apply all the clang-tidy misc-* fixes --- src/irc/iid.cpp | 2 +- src/irc/irc_client.cpp | 4 ++-- src/network/credentials_manager.cpp | 2 +- src/network/tcp_socket_handler.cpp | 1 - src/utils/timed_events.cpp | 4 ++-- 5 files changed, 6 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/irc/iid.cpp b/src/irc/iid.cpp index 63c7039..a63a1c3 100644 --- a/src/irc/iid.cpp +++ b/src/irc/iid.cpp @@ -9,7 +9,7 @@ constexpr char Iid::separator[]; Iid::Iid(std::string local, std::string server, Iid::Type type): - type(std::move(type)), + type(type), local(std::move(local)), server(std::move(server)) { diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp index 710ba15..1d025f2 100644 --- a/src/irc/irc_client.cpp +++ b/src/irc/irc_client.cpp @@ -382,7 +382,7 @@ void IrcClient::send_message(IrcMessage&& message) std::string res; if (!message.prefix.empty()) res += ":" + std::move(message.prefix) + " "; - res += std::move(message.command); + res += message.command; for (const std::string& arg: message.arguments) { if (arg.find(" ") != std::string::npos || @@ -889,7 +889,7 @@ void IrcClient::on_part(const IrcMessage& message) // channel pointer is now invalid channel = nullptr; } - this->bridge.send_muc_leave(iid, std::move(nick), std::move(txt), self); + this->bridge.send_muc_leave(iid, std::move(nick), txt, self); } } diff --git a/src/network/credentials_manager.cpp b/src/network/credentials_manager.cpp index f9f8c94..0908a2f 100644 --- a/src/network/credentials_manager.cpp +++ b/src/network/credentials_manager.cpp @@ -98,7 +98,7 @@ bool BasicCredentialsManager::try_to_open_one_ca_bundle(const std::vector& poller): SocketHandler(poller, -1), diff --git a/src/utils/timed_events.cpp b/src/utils/timed_events.cpp index e35a659..26ded82 100644 --- a/src/utils/timed_events.cpp +++ b/src/utils/timed_events.cpp @@ -3,7 +3,7 @@ TimedEvent::TimedEvent(std::chrono::steady_clock::time_point&& time_point, std::function callback, std::string name): - time_point(std::move(time_point)), + time_point(time_point), callback(std::move(callback)), repeat(false), repeat_delay(0), @@ -16,7 +16,7 @@ TimedEvent::TimedEvent(std::chrono::milliseconds&& duration, time_point(std::chrono::steady_clock::now() + duration), callback(std::move(callback)), repeat(true), - repeat_delay(std::move(duration)), + repeat_delay(duration), name(std::move(name)) { } -- cgit v1.2.3