[RFC] dive merging with 0 depth

Miika Turkia miika.turkia at gmail.com
Thu Feb 4 11:20:05 PST 2016


On Thu, Feb 4, 2016 at 8:44 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
> On Thu, Feb 04, 2016 at 07:49:27PM +0200, Miika Turkia wrote:
>> Should we be merging dives with zero depth? I do not see any real
>> reason to have the check in place, but it would not be the first time
>> I am missing something.
>
> SACRILEGE! You are attempting to change code that was written by the
> MASTER himself in 2012! That code is by definition perfect and inmutable!

I know :D

> /me snaps out of it...
>
> Hmm, I think the rationale was that having a duration or depth of ZERO is
> special in that it means there is no dive. And "no dive" and "a very short
> dive" (or a very shallow dive - this is used both for duration and
> maxdepth), are actually quite different.
>
> So in THAT sense there might be some value here...
>
> BUT:
>
>> Of course, it does not really make sense to have dives with zero depth,
>> but as the bug report is from importing, it really makes even less sense
>> to have a 0 depth dive multiple times in the log.
>
> Well, how about a different fix that keeps the original intent (which I am
> guessing was put there because we found dives where this mattered)?
>
> Add a check for BOTH being 0 before the first check. Because if they are
> BOTH zero, they are the same again, right?

yeah, they are the same, even though not dives in my book :D

miika
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Allow-merging-of-dives-with-zero-depth-duration.patch
Type: text/x-diff
Size: 782 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20160204/71a102bb/attachment.patch>


More information about the subsurface mailing list