From f05102db9ad1effde62d8fb3211772ae2e46f258 Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 28 Jul 2006 15:42:00 +0000 Subject: [PATCH] Remove casts git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4576 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/message.cpp | 22 +++++++++++----------- 1 file 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::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::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::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::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; } -- 2.39.5