Changeset af713bc in network-game
- Timestamp:
- Jul 15, 2013, 11:55:32 PM (11 years ago)
- Branches:
- master
- Children:
- 9557f92
- Parents:
- 3de664d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/MessageProcessor.cpp
r3de664d raf713bc 57 57 58 58 void MessageProcessor::cleanAckedMessages() { 59 map<int, MessageContainer>::iterator it ;59 map<int, MessageContainer>::iterator it = sentMessages.begin(); 60 60 61 for(it = sentMessages.begin(); it != sentMessages.end(); it++) {61 while (it != sentMessages.end()) { 62 62 if (it->second.isAcked && (getCurrentMillis() - it->second.timeAcked) > 1000) 63 sentMessages.erase(it); 63 it = sentMessages.erase(it); 64 else 65 it++; 64 66 } 65 67 }
Note:
See TracChangeset
for help on using the changeset viewer.