From: Andreas Hansson Date: Mon, 9 Jul 2012 16:35:46 +0000 (-0400) Subject: EventManager: Rename queue accessor and remove cast operator X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=745274cbd4851b3bf725b24138c1fd13746492ec;p=gem5.git EventManager: Rename queue accessor and remove cast operator This patch renames the queue() accessor to the less ambigious eventQueue, and also removes the cast operator. The queue() member function cause problems in derived classes that declare members with the same name, e.g. a MemObject subclass that has a packet queue on its own. The operator is not causing any harm at this point, but as it is not used there is little point in keeping it. --- diff --git a/src/sim/eventq.hh b/src/sim/eventq.hh index b04b43702..09483f4e2 100644 --- a/src/sim/eventq.hh +++ b/src/sim/eventq.hh @@ -431,17 +431,12 @@ class EventManager EventQueue *eventq; public: - EventManager(EventManager &em) : eventq(em.queue()) {} - EventManager(EventManager *em) : eventq(em ? em->queue() : NULL) {} + EventManager(EventManager &em) : eventq(em.eventq) {} + EventManager(EventManager *em) : eventq(em ? em->eventq : NULL) {} EventManager(EventQueue *eq) : eventq(eq) {} EventQueue * - queue() const - { - return eventq; - } - - operator EventQueue *() const + eventQueue() const { return eventq; }