[Scummvm-cvs-logs] CVS: scummvm/common timer.cpp,1.21,1.22
Max Horn
fingolfin at users.sourceforge.net
Fri Oct 17 09:32:07 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm scumm.h,1.315,1.316 scummvm.cpp,2.453,2.454 resource.cpp,1.167,1.168
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm sound.cpp,1.266,1.267 sound.h,1.50,1.51
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1:/tmp/cvs-serv9190/common
Modified Files:
timer.cpp
Log Message:
proper fix for COMI timer issue: don't let a Timer remove itself
Index: timer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/timer.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- timer.cpp 17 Oct 2003 11:17:49 -0000 1.21
+++ timer.cpp 17 Oct 2003 16:30:24 -0000 1.22
@@ -91,12 +91,10 @@
for (l = 0; l < MAX_TIMERS; l++) {
if (_timerSlots[l].procedure && _timerSlots[l].interval > 0) {
_timerSlots[l].counter -= interval;
- // FIXME: We only check the value of _timerSlots[l].interval here
- // because the timer might remove itself.
- // Strictly spoken, that is a dirty thing to do for a timer, but for
- // now the bundle timer requires this. Of course the whole bundle
- // music timer is kind of scary anyway...
- while (_timerSlots[l].counter <= 0 && _timerSlots[l].interval > 0) {
+ while (_timerSlots[l].counter <= 0) {
+ // A small paranoia check which catches the case where
+ // a timer removes itself (which it never should do).
+ assert(_timerSlots[l].procedure && _timerSlots[l].interval > 0);
_timerSlots[l].counter += _timerSlots[l].interval;
_timerSlots[l].procedure(_timerSlots[l].refCon);
}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm scumm.h,1.315,1.316 scummvm.cpp,2.453,2.454 resource.cpp,1.167,1.168
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm sound.cpp,1.266,1.267 sound.h,1.50,1.51
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list