Code

worked on path parsing.
[inkscape.git] / src / extension / timer.cpp
index 0e7a6ad112fd8e70eefd825967888ae38004a229..3941ddcfc154cb98a1737577f78cea51904b2209 100644 (file)
@@ -31,13 +31,12 @@ bool ExpirationTimer::timer_started = false;
     This function creates the timer, and sets the time to the current
     time, plus what ever the current timeout is.  Also, if this is
     the first timer extension, the timer is kicked off.  This function
-    also sets up teh circularly linked list of all the timers.
+    also sets up the circularly linked list of all the timers.
 */
-ExpirationTimer::ExpirationTimer (Extension * in_extension)
+ExpirationTimer::ExpirationTimer (Extension * in_extension):
+    locked(0),
+    extension(in_extension)
 {
-    locked = false;
-    extension = in_extension;
-
     /* Fix Me! */
     if (timer_list == NULL) {
         next = this;
@@ -73,7 +72,7 @@ ExpirationTimer::~ExpirationTimer(void)
         ExpirationTimer * prev;
         for (prev = timer_list;
                 prev->next != this;
-                prev = prev->next);
+                prev = prev->next){};
         prev->next = next;
 
         if (idle_start == this)
@@ -124,7 +123,7 @@ ExpirationTimer::touch (void)
 bool
 ExpirationTimer::expired (void) const
 {
-    if (locked) return false;
+    if (locked > 0) return false;
 
     Glib::TimeVal current;
     current.assign_current_time();