mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
bd82940b03
commit
fc55620d2d
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
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(a);
|
||||||
un_fixup_airtemp(b);
|
un_fixup_airtemp(b);
|
||||||
MERGE_NONZERO(res, a, b, airtemp.mkelvin);
|
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);
|
MERGE_NONZERO(res, a, b, picture_list);
|
||||||
taglist_merge(&res->tag_list, a->tag_list, b->tag_list);
|
taglist_merge(&res->tag_list, a->tag_list, b->tag_list);
|
||||||
merge_equipment(res, a, b);
|
merge_equipment(res, a, b);
|
||||||
merge_airtemps(res, a, b);
|
merge_temperatures(res, a, b);
|
||||||
if (dl) {
|
if (dl) {
|
||||||
/* If we prefer downloaded, do those first, and get rid of "might be same" computers */
|
/* 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);
|
join_dive_computers(&res->dc, &dl->dc, &a->dc, 1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue