diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-28 15:42:00 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-28 15:42:00 +0000 |
commit | f05102db9ad1effde62d8fb3211772ae2e46f258 (patch) | |
tree | c6008363f664f566f2e808ae3435894db8f35f76 | |
parent | 96fbde12683057deff15f444a58c217051ddb155 (diff) |
Remove casts
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4576 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | src/message.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/message.cpp b/src/message.cpp index c1c4faa3e..5a09f3f37 100644 --- a/src/message.cpp +++ b/src/message.cpp @@ -121,7 +121,7 @@ int c_count(userrec* u) { int z = 0; for (std::vector<ucrec*>::const_iterator i = u->chans.begin(); i != u->chans.end(); i++) - if (((ucrec*)(*i))->channel) + if ((*i)->channel) z++; return z; @@ -217,17 +217,17 @@ const char* cmode(userrec *user, chanrec *chan) for (std::vector<ucrec*>::const_iterator i = user->chans.begin(); i != user->chans.end(); i++) { - if (((ucrec*)(*i))->channel == chan) + if ((*i)->channel == chan) { - if ((((ucrec*)(*i))->uc_modes & UCMODE_OP) > 0) + if (((*i)->uc_modes & UCMODE_OP) > 0) { return "@"; } - if ((((ucrec*)(*i))->uc_modes & UCMODE_HOP) > 0) + if (((*i)->uc_modes & UCMODE_HOP) > 0) { return "%"; } - if ((((ucrec*)(*i))->uc_modes & UCMODE_VOICE) > 0) + if (((*i)->uc_modes & UCMODE_VOICE) > 0) { return "+"; } @@ -244,9 +244,9 @@ int cflags(userrec *user, chanrec *chan) for (std::vector<ucrec*>::const_iterator i = user->chans.begin(); i != user->chans.end(); i++) { - if (((ucrec*)(*i))->channel == chan) + if ((*i)->channel == chan) { - return ((ucrec*)(*i))->uc_modes; + return (*i)->uc_modes; } } return 0; @@ -269,17 +269,17 @@ int cstatus(userrec *user, chanrec *chan) for (std::vector<ucrec*>::const_iterator i = user->chans.begin(); i != user->chans.end(); i++) { - if (((ucrec*)(*i))->channel == chan) + if ((*i)->channel == chan) { - if ((((ucrec*)(*i))->uc_modes & UCMODE_OP) > 0) + if (((*i)->uc_modes & UCMODE_OP) > 0) { return STATUS_OP; } - if ((((ucrec*)(*i))->uc_modes & UCMODE_HOP) > 0) + if (((*i)->uc_modes & UCMODE_HOP) > 0) { return STATUS_HOP; } - if ((((ucrec*)(*i))->uc_modes & UCMODE_VOICE) > 0) + if (((*i)->uc_modes & UCMODE_VOICE) > 0) { return STATUS_VOICE; } |