1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 21:43:13 +02:00

Fixed some warnings

This commit is contained in:
Adam
2010-10-11 15:37:39 -04:00
parent 0ac77d0e42
commit 717c123441
16 changed files with 64 additions and 62 deletions
+5 -4
View File
@@ -123,10 +123,11 @@ class CommandOSSession : public Command
private:
CommandReturn DoList(User *u, const std::vector<Anope::string> &params)
{
int mincount;
Anope::string param = params[1];
if ((mincount = (param.is_number_only() ? convertTo<int>(param) : 0)) <= 1)
unsigned mincount = param.is_pos_number_only() ? convertTo<unsigned>(param) : 0;
if (mincount <= 1)
u->SendMessage(OperServ, OPER_SESSION_INVALID_THRESHOLD);
else
{
@@ -318,8 +319,8 @@ class CommandOSException : public Command
return MOD_CONT;
}
n1 = n1str.is_number_only() ? convertTo<int>(n1str) - 1 : -1;
n2 = n2str.is_number_only() ? convertTo<int>(n2str) - 1 : -1;
n1 = n1str.is_pos_number_only() ? convertTo<int>(n1str) - 1 : -1;
n2 = n2str.is_pos_number_only() ? convertTo<int>(n2str) - 1 : -1;
if (n1 >= 0 && n1 < exceptions.size() && n2 >= 0 && n2 < exceptions.size() && n1 != n2)
{