diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-09-07 10:12:31 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-09-07 10:12:31 -0700 |
commit | b49b081bb9c3938e5df201350a3a7d397c2c6216 (patch) | |
tree | 0fb28dc9756f18ce13011e5754882c789f444cf9 /display.h | |
parent | 6ddf0e1d227bdf707469a2d7313ea850d35a6cda (diff) | |
download | subsurface-b49b081bb9c3938e5df201350a3a7d397c2c6216.tar.gz |
Handle new dives correctly if trips exist
There is an interesting issue when adding new dives into a dive list with
existing trips. Since fill_dive_list walks the list backwards and trips
are determined by the timestamp of the first dive in a trip, it is
non-trivial to know when a dive is added if it should be part of an
existing trip or not. Let's say when we see the dive we can also see a
trip entry that starts four days earlier. Without looking forward in the
list of dives we cannot tell if this is a multi-day trip that this dive
would fit into, or if there is a break of more than tree days (our current
trip threshold).
Instead this commit adds a second scan of the dives in chronological order
that does the right thing for new dives.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'display.h')
0 files changed, 0 insertions, 0 deletions