sim: clean up CountedDrainEvent slightly.

There's no reason for it to derive from SimLoopExitEvent.
This whole drain thing needs to be redone eventually,
but this is a stopgap to make later changes to
SimLoopExitEvent feasible.
This commit is contained in:
Steve Reinhardt 2011-01-07 21:50:29 -08:00
parent 030736a69b
commit 94807214c4
2 changed files with 3 additions and 3 deletions

View file

@ -85,14 +85,14 @@ exitSimLoop(const std::string &message, int exit_code, Tick when, Tick repeat)
}
CountedDrainEvent::CountedDrainEvent()
: SimLoopExitEvent("Finished drain", 0), count(0)
: count(0)
{ }
void
CountedDrainEvent::process()
{
if (--count == 0)
exitSimLoop(cause, code);
exitSimLoop("Finished drain", 0);
}
//

View file

@ -55,7 +55,7 @@ class SimLoopExitEvent : public Event
virtual const char *description() const;
};
class CountedDrainEvent : public SimLoopExitEvent
class CountedDrainEvent : public Event
{
private:
// Count of how many objects have not yet drained