mirror of https://github.com/fltk/fltk
Fl_has_idle only tested N-1 callbacks and missed one
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1427 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
339b9cd8a0
commit
7b7ca88b49
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// "$Id: Fl_add_idle.cxx,v 1.4.2.6 2001/01/22 15:13:40 easysw Exp $"
|
||||
// "$Id: Fl_add_idle.cxx,v 1.4.2.7 2001/04/13 17:22:43 spitzak Exp $"
|
||||
//
|
||||
// Idle routine support for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
|
@ -65,9 +65,12 @@ void Fl::add_idle(void (*cb)(void*), void* data) {
|
|||
}
|
||||
|
||||
int Fl::has_idle(void (*cb)(void*), void* data) {
|
||||
for (idle_cb* p = first; p != last; p = p->next)
|
||||
idle_cb* p = first;
|
||||
if (!p) return 0;
|
||||
for (;; p = p->next) {
|
||||
if (p->cb == cb && p->data == data) return 1;
|
||||
return 0;
|
||||
if (p==last) return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void Fl::remove_idle(void (*cb)(void*), void* data) {
|
||||
|
@ -91,5 +94,5 @@ void Fl::remove_idle(void (*cb)(void*), void* data) {
|
|||
}
|
||||
|
||||
//
|
||||
// End of "$Id: Fl_add_idle.cxx,v 1.4.2.6 2001/01/22 15:13:40 easysw Exp $".
|
||||
// End of "$Id: Fl_add_idle.cxx,v 1.4.2.7 2001/04/13 17:22:43 spitzak Exp $".
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue