X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fextension%2Ftimer.cpp;h=3941ddcfc154cb98a1737577f78cea51904b2209;hb=c44173a5bb8a1c0ae9b89fed53701deb246e2d03;hp=0e7a6ad112fd8e70eefd825967888ae38004a229;hpb=6b15695578f07a3f72c4c9475c1a261a3021472a;p=inkscape.git diff --git a/src/extension/timer.cpp b/src/extension/timer.cpp index 0e7a6ad11..3941ddcfc 100644 --- a/src/extension/timer.cpp +++ b/src/extension/timer.cpp @@ -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();