Fix a few issues reported by static analyzers
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user