Ignore:
Timestamp:
05/27/11 16:30:07 (13 years ago)
Author:
tbretz
Message:
Replaced a self-done loop by std::find; changed some comments.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/StateMachineImp.cc

    r10780 r10873  
    316316        // FIXME: Is this thread safe? (Yes, because the data is copied)
    317317        // But two handlers could be called at the same time. Do we
    318         // need to lock the handlers?
     318        // need to lock the handlers? (Dim + console)
     319        // FIXME: Is copying of the data necessary?
    319320        const Event event(evt, ptr, siz);
    320321        HandleEvent(event);
     
    456457{
    457458    // Find the event from the list of commands and queue it
    458     for (vector<EventImp*>::const_iterator c=fListOfEvents.begin(); c!=fListOfEvents.end(); c++)
    459         if (*c == cmd)
    460             return true;
    461 
    462     return false;
     459    return find(fListOfEvents.begin(), fListOfEvents.end(), cmd)!=fListOfEvents.end();
    463460}
    464461
Note: See TracChangeset for help on using the changeset viewer.