Commit 52166e07 authored by louiz’'s avatar louiz’

Trivial syntax improvements

parent 870692dc
......@@ -63,7 +63,8 @@ void Bridge::shutdown(const std::string& exit_message)
{
for (auto& pair: this->irc_clients)
{
pair.second->send_quit_command(exit_message);
std::shared_ptr<IrcClient>& irc = pair.second;
irc->send_quit_command(exit_message);
}
}
......
......@@ -28,7 +28,7 @@ struct Row
this->clear_col<0>();
}
std::tuple<T...> columns;
std::tuple<T...> columns{};
std::string table_name;
private:
......
......@@ -480,7 +480,7 @@ void IrcClient::send_quit_command(const std::string& reason)
void IrcClient::send_join_command(const std::string& chan_name, const std::string& password)
{
if (this->welcomed == false)
if (!this->welcomed)
{
const auto it = std::find_if(begin(this->channels_to_join), end(this->channels_to_join),
[&chan_name](const auto& pair) { return std::get<0>(pair) == chan_name; });
......@@ -497,7 +497,7 @@ void IrcClient::send_join_command(const std::string& chan_name, const std::strin
bool IrcClient::send_channel_message(const std::string& chan_name, const std::string& body)
{
IrcChannel* channel = this->get_channel(chan_name);
if (channel->joined == false)
if (!channel->joined)
{
log_warning("Cannot send message to channel ", chan_name, ", it is not joined");
return false;
......
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