X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=parse-xml.c;h=e6ace216fb7c17336f3f4e9456dc259ba5d55469;hb=2804dc42d81a728c62b173f55bbfc075cf643a00;hp=3a84e296321d06b1453f86c2d868f78ff5b4cc8e;hpb=5f05173e793d49319c727240014b59a04bd4075c;p=ext%2Fsubsurface.git diff --git a/parse-xml.c b/parse-xml.c index 3a84e29..e6ace21 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -29,7 +29,7 @@ static void record_dive(struct dive *dive) dive_table.dives = dives; dive_table.allocated = allocated; } - dives[nr] = dive; + dives[nr] = fixup_dive(dive); dive_table.nr = nr+1; } @@ -787,19 +787,6 @@ static void sample_end(void) if (!dive) return; - if (sample->time.seconds > dive->duration.seconds) { - if (sample->depth.mm) - dive->duration = sample->time; - } - - if (sample->depth.mm > dive->maxdepth.mm) - dive->maxdepth.mm = sample->depth.mm; - - if (sample->temperature.mkelvin) { - if (!dive->watertemp.mkelvin || dive->watertemp.mkelvin > sample->temperature.mkelvin) - dive->watertemp = sample->temperature; - } - sample = NULL; dive->samples++; }