summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-17 13:58:04 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-08-17 13:58:04 +0000
commit9037003b8895bfbda403e22c8303e080f28652da (patch)
tree9092f9498d36109bcd8aaa2c08abda6ce23f0280
parente0a572b920c2805afb3954773264994eed36bf1a (diff)
Optimization and removal of casts (profiling stuff)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4930 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/userprocess.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/userprocess.cpp b/src/userprocess.cpp
index 49a4e9089..8c048c760 100644
--- a/src/userprocess.cpp
+++ b/src/userprocess.cpp
@@ -265,16 +265,16 @@ void InspIRCd::ProcessUser(userrec* cu)
void InspIRCd::DoSocketTimeouts(time_t TIME)
{
unsigned int numsockets = this->module_sockets.size();
- SocketEngine* SE = this->SE;
for (std::vector<InspSocket*>::iterator a = this->module_sockets.begin(); a < this->module_sockets.end(); a++)
{
- InspSocket* s = (InspSocket*)*a;
- if ((s) && (s->GetFd() >= 0) && (s->GetFd() < MAX_DESCRIPTORS) && (this->socket_ref[s->GetFd()] != NULL) && (s->Timeout(TIME)))
+ InspSocket* s = *a;
+ int fd = s->GetFd();
+ if ((s) && (fd >= 0) && (fd < MAX_DESCRIPTORS) && (this->socket_ref[fd] != NULL) && (s->Timeout(TIME)))
{
this->Log(DEBUG,"userprocess.cpp: Socket poll returned false, close and bail");
- this->socket_ref[s->GetFd()] = NULL;
- SE->DelFd(s->GetFd());
+ this->socket_ref[fd] = NULL;
+ SE->DelFd(fd);
this->module_sockets.erase(a);
s->Close();
DELETE(s);