Apply all the clang-tidy performance-* fixes

This commit is contained in:
louiz’
2017-04-07 19:01:49 +02:00
parent b82a14f20e
commit be9c577de8
7 changed files with 10 additions and 10 deletions
+2 -2
View File
@@ -385,7 +385,7 @@ void IrcClient::send_message(IrcMessage&& message)
res += message.command;
for (const std::string& arg: message.arguments)
{
if (arg.find(" ") != std::string::npos ||
if (arg.find(' ') != std::string::npos ||
(!arg.empty() && arg[0] == ':'))
{
res += " :" + arg;
@@ -1080,7 +1080,7 @@ void IrcClient::on_channel_mode(const IrcMessage& message)
{
// That mode can also be of type B if it is present in the
// prefix_to_mode map
for (const std::pair<char, char>& pair: this->prefix_to_mode)
for (const auto& pair: this->prefix_to_mode)
if (pair.second == c)
{
type = 1;