summaryrefslogtreecommitdiff
path: root/src/irc
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-12-17 13:37:57 +0100
committerFlorent Le Coz <louiz@louiz.org>2014-12-17 13:37:57 +0100
commit720e31a5113c25e48d7754bb812ab84c6c31d1d9 (patch)
tree5a697d40c8df6c71d37168e401a058b94f0b20cf /src/irc
parent0ab5ecea133cef5a009bc34ba42c4eaacde6a7dd (diff)
downloadbiboumi-720e31a5113c25e48d7754bb812ab84c6c31d1d9.tar.gz
biboumi-720e31a5113c25e48d7754bb812ab84c6c31d1d9.tar.bz2
biboumi-720e31a5113c25e48d7754bb812ab84c6c31d1d9.tar.xz
biboumi-720e31a5113c25e48d7754bb812ab84c6c31d1d9.zip
Fix a few issues reported by static analyzers
Diffstat (limited to 'src/irc')
-rw-r--r--src/irc/irc_channel.cpp2
-rw-r--r--src/irc/irc_channel.hpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/irc/irc_channel.cpp b/src/irc/irc_channel.cpp
index 2c0f8b1..b1b3983 100644
--- a/src/irc/irc_channel.cpp
+++ b/src/irc/irc_channel.cpp
@@ -12,7 +12,7 @@ void IrcChannel::set_self(const std::string& name)
}
IrcUser* IrcChannel::add_user(const std::string& name,
- const std::map<char, char> prefix_to_mode)
+ const std::map<char, char>& prefix_to_mode)
{
this->users.emplace_back(std::make_unique<IrcUser>(name, prefix_to_mode));
return this->users.back().get();
diff --git a/src/irc/irc_channel.hpp b/src/irc/irc_channel.hpp
index 1c074b5..568de0a 100644
--- a/src/irc/irc_channel.hpp
+++ b/src/irc/irc_channel.hpp
@@ -21,7 +21,7 @@ public:
void set_self(const std::string& name);
IrcUser* get_self() const;
IrcUser* add_user(const std::string& name,
- const std::map<char, char> prefix_to_mode);
+ const std::map<char, char>& prefix_to_mode);
IrcUser* find_user(const std::string& name) const;
void remove_user(const IrcUser* user);
void remove_all_users();