Author: AlbrechtS
Date: 2011-01-08 03:53:28 -0800 (Sat, 08 Jan 2011)
New Revision: 8216
Log:
Removed unused (but unnecessarily incremented and decremented)
timeout counter variables and improved comment.
Modified:
branches/branch-1.3/src/Fl.cxx
Modified: branches/branch-1.3/src/Fl.cxx
===================================================================
--- branches/branch-1.3/src/Fl.cxx 2011-01-07 21:27:30 UTC (rev 8215)
+++ branches/branch-1.3/src/Fl.cxx 2011-01-08 11:53:28 UTC (rev 8216)
@@ -183,10 +183,12 @@
//
-////////////////////////////////////////////////////////////////
-// 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 @@
Timeout* next;
};
static Timeout* first_timeout, *free_timeout;
-static int first_timeout_count, free_timeout_count;
#include <sys/time.h>
@@ -235,7 +236,6 @@
Timeout* t = free_timeout;
if (t) {
free_timeout = t->next;
- --free_timeout_count;
} else {
t = new Timeout;
}
@@ -435,8 +435,6 @@
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);
}
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit