Skip to content

Commit a5f698b

Browse files
committed
fix: compile
1 parent e4ad1bd commit a5f698b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

includes/exceptions/exceptions.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,39 +126,39 @@ class PasswordMismatchException : public IRCException {
126126
*/
127127
class InviteOnlyChanException : public IRCException {
128128
public:
129-
InviteOnlyChanException(std::string &channelName) : IRCException("473", channelName + " :Cannot join channel (+i)") {}
129+
InviteOnlyChanException(const std::string &channelName) : IRCException("473", channelName + " :Cannot join channel (+i)") {}
130130
};
131131

132132
/**
133133
* This exception is thrown when an user attemps to join a channel where it was banned previously.
134134
*/
135135
class BannedFromChanException : public IRCException {
136136
public:
137-
BannedFromChanException(std::string &channelName) : IRCException("474", channelName + " :Cannot join channel (+b)") {}
137+
BannedFromChanException(const std::string &channelName) : IRCException("474", channelName + " :Cannot join channel (+b)") {}
138138
};
139139

140140
/**
141141
* This exception is thrown when a channel password is incorrect.
142142
*/
143143
class BadChannelKeyException : public IRCException {
144144
public:
145-
BadChannelKeyException(std::string &channelName) : IRCException("475", channelName + " :Cannot join channel (+k)") {}
145+
BadChannelKeyException(const std::string &channelName) : IRCException("475", channelName + " :Cannot join channel (+k)") {}
146146
};
147147

148148
/**
149149
* This exception is thrown when the channel is full
150150
*/
151151
class ChannelIsFullException : public IRCException {
152152
public:
153-
ChannelIsFullException(std::string &channelName) : IRCException("471", channelName + " :Cannot join channel (+l)") {}
153+
ChannelIsFullException(const std::string &channelName) : IRCException("471", channelName + " :Cannot join channel (+l)") {}
154154
};
155155

156156
/**
157157
* This exception is thrown when a user joins too many channels.
158158
*/
159159
class TooManyChannelsException : public IRCException {
160160
public:
161-
TooManyChannelsException(std::string &channelName) : IRCException("405", channelName + " :You have joined too many channels") {}
161+
TooManyChannelsException(const std::string &channelName) : IRCException("405", channelName + " :You have joined too many channels") {}
162162
};
163163

164164
/**

0 commit comments

Comments
 (0)