>This won't work. E.g. when all rects in "second" are already >through, b >will point to the last of its rects, whose top will be <= the >previous >band's bottom. Thus the next band's top will be "bottom + 1" >again, even if >there's still a rect in "first" which starts farther down. >I can say that it doesn't work with certainty, because the >change you >proposed, was what I tried myself first. :-) Aw, okay, never mind then. >The idea I had after that, though I never tried that (since >just replacing >the ASSERT by a return was so much simpler :-), was to use >the line you >propose, but only when both regions aren't though yet (i.e. >the bottom of >their last rects has not been passed yet). Otherwise the >concerned >region(s) would be ignored in the calculation of the next >"top". [cut] >PPS: This passing of similar parameters and backpassing of >indices through >pointers between the involved functions looks a bit like >refactoring the >stuff into a helper class that uses non-static methods might >be a good idea. Yes, definitely! I always wanted to refactor that part, there's, in fact, also a TODO in there. But, unfortunately, never found the time to do that. And still, I don't think I could do it in the foreseeable future (no (easy)access to a real beos box). Maybe now that the build works on linux, though, things could be better. Anyway, I guess you'll have to live with your workaround for the moment, unless someone else will step in to refactor that code. Stefano Ceccherini aka Jack Burton -------------------------------------------------------------- Non resistere alla tentazione di conoscere nuovi amori! Oltre 1.800.000 persone ti stanno aspettando su Incontri. Vivi le emozioni fino in fondo! http://www.supereva.com ---------------------------------------------------------------