From 351f1d03315b84887b7532c35bdd8a49bdce1d43 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 14 Apr 2002 11:37:22 +0000 Subject: Using some references instead of pointers for the menus. --- src/Timer.cc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/Timer.cc') diff --git a/src/Timer.cc b/src/Timer.cc index 95985a01..917bc337 100644 --- a/src/Timer.cc +++ b/src/Timer.cc @@ -33,10 +33,7 @@ #include "BaseDisplay.h" #include "Timer.h" -BTimer::BTimer(BaseDisplay *d, TimeoutHandler *h) { - display = d; - handler = h; - +BTimer::BTimer(BaseDisplay &d, TimeoutHandler &h) : display(d), handler(h) { once = timing = False; } @@ -61,16 +58,16 @@ void BTimer::start(void) { if (! timing) { timing = True; - display->addTimer(this); + display.addTimer(this); } } void BTimer::stop(void) { timing = False; - display->removeTimer(this); + display.removeTimer(this); } void BTimer::fireTimeout(void) { - if (handler) handler->timeout(); + handler.timeout(); } -- cgit v1.2.3