From 745274cbd4851b3bf725b24138c1fd13746492ec Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Mon, 9 Jul 2012 12:35:46 -0400 Subject: [PATCH] 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. --- src/sim/eventq.hh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) 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; } -- 2.30.2