diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-19 12:56:54 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-02-19 15:23:46 -0800 |
commit | fc55620d2d2942f7f8d95b5e73f8b58ec17ffdb9 (patch) | |
tree | b0b34f596f5916e7edf3485e8c52317699dca4ed /core/dive.c | |
parent | bd82940b03d5c190444d13a588ea1ca863a37ca2 (diff) | |
download | subsurface-fc55620d2d2942f7f8d95b5e73f8b58ec17ffdb9.tar.gz |
dive merging: merge water temperature too, not just air temperature
I have no idea why we only merged air temperatures. But it was very
explicit (even the function doing the merging was named
"merge_airtemp()"), and water temperatures were left alone.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'core/dive.c')
-rw-r--r-- | core/dive.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/dive.c b/core/dive.c index 2c699fb9a..72abee41e 100644 --- a/core/dive.c +++ b/core/dive.c @@ -2195,11 +2195,12 @@ static void merge_equipment(struct dive *res, struct dive *a, struct dive *b) merge_weightsystem_info(res->weightsystem + i, a->weightsystem + i, b->weightsystem + i); } -static void merge_airtemps(struct dive *res, struct dive *a, struct dive *b) +static void merge_temperatures(struct dive *res, struct dive *a, struct dive *b) { un_fixup_airtemp(a); un_fixup_airtemp(b); MERGE_NONZERO(res, a, b, airtemp.mkelvin); + MERGE_NONZERO(res, a, b, watertemp.mkelvin); } /* @@ -3158,7 +3159,7 @@ struct dive *merge_dives(struct dive *a, struct dive *b, int offset, bool prefer MERGE_NONZERO(res, a, b, picture_list); taglist_merge(&res->tag_list, a->tag_list, b->tag_list); merge_equipment(res, a, b); - merge_airtemps(res, a, b); + merge_temperatures(res, a, b); if (dl) { /* If we prefer downloaded, do those first, and get rid of "might be same" computers */ join_dive_computers(&res->dc, &dl->dc, &a->dc, 1); |