On 14 Sep 2015, at 16:42, Dirk Hohndel <[email protected]> wrote: Dirk,
> Either way - the code below has me a bit unhappy as we start the loop with > sample pointing at the very first sample. > > So simply accessing sample[-1]? Probably not a good solution. > > Which begs the question, do we need this transition for the first step > (which starts at the surface)? it’s not that I had not worried about this problem. In fact, I did some testing and it seems the case i=0 that would access sample[-1] is dangerous. But in fact, that is always the surface sample of 0 duration. So it does not really do anything and I concluded this is save. But if you want, I can protect this with a if(i) in front. Or at least add a comment or a remark in the commit message. What do you think? Robert
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
