]> Dogcows Code - chaz/openbox/blobdiff - src/Timer.cc
fixed a memory leak for resource.titlebar_layout
[chaz/openbox] / src / Timer.cc
index 95985a0159c780e46430db03d749ee3ed4516ab1..917bc3375a7e22d368d039eed79a0780c670cd9a 100644 (file)
 #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();
 }
This page took 0.021292 seconds and 4 git commands to generate.