replaced iterator based loop with index based loop as iterator definitions differ between SDL implementation
This commit is contained in:
parent
7966589b87
commit
6382422162
1 changed files with 6 additions and 6 deletions
|
@ -474,13 +474,13 @@ int flush(Uint32 event_mask)
|
|||
}
|
||||
|
||||
//FIXME: there is a chance new events are added before kept events are replaced
|
||||
std::vector<SDL_Event>::iterator itor;
|
||||
for(itor = keepers.begin(); itor != keepers.end(); ++itor)
|
||||
for (unsigned int i=0; i < keepers.size(); ++i)
|
||||
{
|
||||
if(SDL_PushEvent(itor) != 0) {
|
||||
ERR_GEN << "failed to return an event to the queue.";
|
||||
}
|
||||
}
|
||||
if(SDL_PushEvent(&keepers[i]) != 0) {
|
||||
ERR_GEN << "failed to return an event to the queue.";
|
||||
}
|
||||
}
|
||||
|
||||
return flush_count;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue