Changeset 14072 for trunk/FACT++/src


Ignore:
Timestamp:
06/04/12 21:53:32 (12 years ago)
Author:
tbretz
Message:
I don't know what exactly it is about the deque I am using, but it seems that what is returned by front() is not 0 even if the queue is empty (size()==0); I hope that this now fixes the problem.
File:
1 edited

Legend:

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

    r14005 r14072  
    140140    // Unfortunately, front() doesn't necessarily return 0 if
    141141    // queue is empty
    142     if (fEventQueue.size())
    143     {
    144         while (1)
    145         {
    146             Event *q=fEventQueue.front();
    147             if (!q)
    148                 break;
    149 
    150             fEventQueue.pop();
    151             delete q;
    152         }
     142    while (fEventQueue.size())
     143    {
     144        Event *q=fEventQueue.front();
     145        if (!q)
     146            break;
     147
     148        fEventQueue.pop();
     149        delete q;
    153150    }
    154151}
Note: See TracChangeset for help on using the changeset viewer.