diff options
author | Robert C. Helling <helling@atdotde.de> | 2017-02-02 20:29:44 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-02-02 12:37:24 -0800 |
commit | 1d8662006cbb5edae941315e30ede381c23a817b (patch) | |
tree | 88ff6ec54d5e4ed4e29f3b93bea04292ef986e5f /core/dive.c | |
parent | a031dbbbd8fbd8a913e517cf1bea5d61311bf266 (diff) | |
download | subsurface-1d8662006cbb5edae941315e30ede381c23a817b.tar.gz |
In statistics, ignore gas use of planned dives
When merged with real dives, those would double count otherwise.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'core/dive.c')
-rw-r--r-- | core/dive.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/dive.c b/core/dive.c index 19a950482..b305df56d 100644 --- a/core/dive.c +++ b/core/dive.c @@ -582,7 +582,7 @@ void copy_cylinders(struct dive *s, struct dive *d, bool used_only) memset(&d->cylinder[i], 0, sizeof(cylinder_t)); } for (i = j = 0; i < MAX_CYLINDERS; i++) { - if (!used_only || is_cylinder_used(s, i)) { + if (!used_only || is_cylinder_used(s, i, false)) { d->cylinder[j].type = s->cylinder[i].type; d->cylinder[j].type.description = copy_string(s->cylinder[i].type.description); d->cylinder[j].gasmix = s->cylinder[i].gasmix; @@ -2050,10 +2050,10 @@ static void merge_cylinders(struct dive *res, struct dive *a, struct dive *b) } else { int j=0; for (i = 0; i < MAX_CYLINDERS && j < MAX_CYLINDERS; i++) { - if (is_cylinder_used(res, i)) + if (is_cylinder_used(res, i, false)) continue; - while (!is_cylinder_used(b, j) && j < MAX_CYLINDERS - 1) { + while (!is_cylinder_used(b, j, false) && j < MAX_CYLINDERS - 1) { mapping[j] = 0; ++j; } |