summaryrefslogtreecommitdiffstats
path: root/core/plannernotes.c
diff options
context:
space:
mode:
authorGravatar Willem Ferguson <willemferguson@zoology.up.ac.za>2018-04-05 14:13:34 +0200
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2018-05-14 23:47:00 +0300
commit0e08c0870a1c82ded398e1d2fb830d61ffe6a647 (patch)
treedd61315c48a16c4f598a4e32dc3ac829a1ce8487 /core/plannernotes.c
parentc1d04ef7dcbbe34eccf4515a59063ed807e8d5e5 (diff)
downloadsubsurface-0e08c0870a1c82ded398e1d2fb830d61ffe6a647.tar.gz
Simplify the bailout detection functions.
Function peek_next_divemodechange() is redundant if get_next_divemodechange() has one additional parameter. Calls to get_next_divemodechange() were updated in divelist.c, plannernotes.c and profile.c. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Diffstat (limited to 'core/plannernotes.c')
-rw-r--r--core/plannernotes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/plannernotes.c b/core/plannernotes.c
index 269b391a8..4d70b9af9 100644
--- a/core/plannernotes.c
+++ b/core/plannernotes.c
@@ -542,7 +542,7 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d
struct event *nextev, *evd = dive->dc.events;
current_divemode = dive->dc.divemode;
- nextev = get_next_divemodechange(&evd);
+ nextev = get_next_divemodechange(&evd, TRUE);
if (dive->dc.divemode != CCR) {
while (dp) {
@@ -552,7 +552,7 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d
if (nextev && (dp->time >= nextev->time.seconds)) { // If there are divemode changes and divedatapoint time
current_divemode = nextev->divemode; // has reached that of the current divemode event, then set the
- nextev = get_next_divemodechange(&evd); // current divemode and find the next divemode event
+ nextev = get_next_divemodechange(&evd, TRUE); // current divemode and find the next divemode event
}
amb = depth_to_atm(dp->depth.mm, dive);