diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-08 11:36:08 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-02-09 21:30:49 -0800 |
commit | e2bbd0ceecff7193bb272430fbebfc4b02dd67c3 (patch) | |
tree | 84d1e4f43da0cb524702952bff96ec6cd8906fe4 /core/units.h | |
parent | 8f97c4a8eb2b7d70be3d323730a401d788222dcf (diff) | |
download | subsurface-e2bbd0ceecff7193bb272430fbebfc4b02dd67c3.tar.gz |
Rewrite cylinder merging code from scratch
The old cylinder merging code depended on the preferred dive having all
the cylinders, and the newly merged dive was just forced to pick from
that existing set of cylinders.
That worked ok if you have a "main" dive computer that you have all the
gases programmed for, and you download that first, and then you download
any secondary data later.
But it completely messed up if the second dive computer had gases that
the first one didn't know about, and just basically ended up doing
random things.
This rewrites the whole thing to actually try to create a union of the
two sets of cylinders when merging, with sane matching so that if the
cylinders match you won't get duplicates.
Miika Turkia hit this when he only used one gas, but had several gases
defined in his OSTC that he downloaded after his Vyper (with had just
the single gas defined).
This should fix that case (at least it does for my xml merging test-case
that showed the same problem after some munging).
Reported-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'core/units.h')
0 files changed, 0 insertions, 0 deletions