diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2011-01-08 11:53:28 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2011-01-08 11:53:28 +0000 |
| commit | f62a6a927a8ce7aa91b023e7aafad9b5ff96f755 (patch) | |
| tree | 4846fe3e800834b33783921688014c7b9cd2ee69 /src | |
| parent | 45745509f0050f1549ae3f88e3c52ff2fc4fbedb (diff) | |
Removed unused (but unnecessarily incremented and decremented)
timeout counter variables and improved comment.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8216 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx index 07c7ff4b7..a8cc29d52 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -183,10 +183,12 @@ int Fl::event_inside(const Fl_Widget *o) /*const*/ { // -//////////////////////////////////////////////////////////////// -// Timeouts are stored in a sorted list, so only the first one needs -// to be checked to see if any should be called. - +//////////////////////////////////////////////////////////////////////// +// Timeouts are stored in a sorted list (*first_timeout), so only the +// first one needs to be checked to see if any should be called. +// Allocated, but unused (free) Timeout structs are stored in another +// linked list (*free_timeout). + struct Timeout { double time; void (*cb)(void*); @@ -194,7 +196,6 @@ struct Timeout { Timeout* next; }; static Timeout* first_timeout, *free_timeout; -static int first_timeout_count, free_timeout_count; #include <sys/time.h> @@ -235,7 +236,6 @@ void Fl::repeat_timeout(double time, Fl_Timeout_Handler cb, void *argp) { Timeout* t = free_timeout; if (t) { free_timeout = t->next; - --free_timeout_count; } else { t = new Timeout; } @@ -435,8 +435,6 @@ double Fl::wait(double time_to_wait) { first_timeout = t->next; t->next = free_timeout; free_timeout = t; - ++free_timeout_count; - --first_timeout_count; // Now it is safe for the callback to do add_timeout: cb(argp); } |
