summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-08-06 11:25:15 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-08-08 16:26:31 -0700
commit90ea46ff31d924e90401d0300260a67a83d417a7 (patch)
tree41f248335a1f1d0386040b9660a26a17ae621a2a /core
parent00944f7a02c98bd281778218bccc592896386f14 (diff)
downloadsubsurface-90ea46ff31d924e90401d0300260a67a83d417a7.tar.gz
Planner: fix comment for create_dive_from_plan()
The function comment talks about overwriting displayed_dive, when in reality the function overwrites a passed in dive. Also fix a debug-call which dumped the displayed_dive, not the actual dive to stdout. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core')
-rw-r--r--core/planner.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/planner.c b/core/planner.c
index 9cf4fc6ec..deacab6f5 100644
--- a/core/planner.c
+++ b/core/planner.c
@@ -233,7 +233,7 @@ static void update_cylinder_pressure(struct dive *d, int old_depth, int new_dept
}
}
-/* simply overwrite the data in the displayed_dive
+/* overwrite the data in dive
* return false if something goes wrong */
static void create_dive_from_plan(struct diveplan *diveplan, struct dive *dive, bool track_gas)
{
@@ -256,7 +256,7 @@ static void create_dive_from_plan(struct diveplan *diveplan, struct dive *dive,
#endif
dive->salinity = diveplan->salinity;
// reset the cylinders and clear out the samples and events of the
- // displayed dive so we can restart
+ // dive-to-be-planned so we can restart
reset_cylinders(dive, track_gas);
dc = &dive->dc;
dc->when = dive->when = diveplan->when;
@@ -343,7 +343,7 @@ static void create_dive_from_plan(struct diveplan *diveplan, struct dive *dive,
dive->dc.last_manual_time.seconds = last_manual_point;
#if DEBUG_PLAN & 32
- save_dive(stdout, &displayed_dive);
+ save_dive(stdout, dive);
#endif
return;
}