mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-28 13:01:31 +00:00
Post-inc to pre-inc
This commit is contained in:
parent
16a6fc7d2c
commit
bb8a82030f
@ -242,7 +242,7 @@ void EQStreamFactory::CheckTimeout()
|
||||
//everybody is done, we can delete it now
|
||||
//std::cout << "Removing connection" << std::endl;
|
||||
std::map<std::pair<uint32, uint16>,EQStream *>::iterator temp=stream_itr;
|
||||
stream_itr++;
|
||||
++stream_itr;
|
||||
//let whoever has the stream outside delete it
|
||||
delete temp->second;
|
||||
Streams.erase(temp);
|
||||
@ -250,7 +250,7 @@ void EQStreamFactory::CheckTimeout()
|
||||
}
|
||||
}
|
||||
|
||||
stream_itr++;
|
||||
++stream_itr;
|
||||
}
|
||||
MStreams.unlock();
|
||||
}
|
||||
@ -285,7 +285,7 @@ Timer DecayTimer(20);
|
||||
//copy streams into a seperate list so we dont have to keep
|
||||
//MStreams locked while we are writting
|
||||
MStreams.lock();
|
||||
for(stream_itr=Streams.begin();stream_itr!=Streams.end();stream_itr++) {
|
||||
for(stream_itr=Streams.begin();stream_itr!=Streams.end();++stream_itr) {
|
||||
// If it's time to decay the bytes sent, then let's do it before we try to write
|
||||
if (decay)
|
||||
stream_itr->second->Decay();
|
||||
@ -307,7 +307,7 @@ Timer DecayTimer(20);
|
||||
//do the actual writes
|
||||
cur = wants_write.begin();
|
||||
end = wants_write.end();
|
||||
for(; cur != end; cur++) {
|
||||
for(; cur != end; ++cur) {
|
||||
(*cur)->Write(sock);
|
||||
(*cur)->ReleaseFromUse();
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ EQStreamIdentifier::~EQStreamIdentifier() {
|
||||
std::vector<Record *>::iterator cur, end;
|
||||
cur = m_streams.begin();
|
||||
end = m_streams.end();
|
||||
for(; cur != end; cur++) {
|
||||
for(; cur != end; ++cur) {
|
||||
Record *r = *cur;
|
||||
r->stream->ReleaseFromUse();
|
||||
delete r;
|
||||
@ -19,7 +19,7 @@ EQStreamIdentifier::~EQStreamIdentifier() {
|
||||
std::vector<Patch *>::iterator curp, endp;
|
||||
curp = m_patches.begin();
|
||||
endp = m_patches.end();
|
||||
for(; curp != endp; curp++) {
|
||||
for(; curp != endp; ++curp) {
|
||||
delete *curp;
|
||||
}
|
||||
}
|
||||
@ -56,7 +56,7 @@ void EQStreamIdentifier::Process() {
|
||||
//if stream hasn't finished initializing then continue;
|
||||
if(r->stream->GetState() == UNESTABLISHED)
|
||||
{
|
||||
cur++;
|
||||
++cur;
|
||||
continue;
|
||||
}
|
||||
if(r->stream->GetState() != ESTABLISHED) {
|
||||
@ -94,7 +94,7 @@ void EQStreamIdentifier::Process() {
|
||||
//foreach possbile patch...
|
||||
curp = m_patches.begin();
|
||||
endp = m_patches.end();
|
||||
for(; !found_one && curp != endp; curp++) {
|
||||
for(; !found_one && curp != endp; ++curp) {
|
||||
Patch *p = *curp;
|
||||
|
||||
//ask the stream to see if it matches the supplied signature
|
||||
@ -137,7 +137,7 @@ void EQStreamIdentifier::Process() {
|
||||
delete r;
|
||||
cur = m_streams.erase(cur);
|
||||
} else {
|
||||
cur++;
|
||||
++cur;
|
||||
}
|
||||
} //end foreach stream
|
||||
}
|
||||
|
||||
@ -138,7 +138,7 @@ public:
|
||||
iterator cur, end;
|
||||
cur = streams.begin();
|
||||
end = streams.end();
|
||||
for(; cur != end; cur++) {
|
||||
for(; cur != end; ++cur) {
|
||||
if(cur->second == it) {
|
||||
streams.erase(cur);
|
||||
//lazy recursive delete for now, since we have to redo
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user