summaryrefslogtreecommitdiffstats
path: root/core/profile.c
diff options
context:
space:
mode:
authorGravatar Rick Walsh <rickmwalsh@gmail.com>2017-11-02 17:59:20 +1100
committerGravatar Robert C. Helling <helling@atdotde.de>2017-11-08 15:22:32 +0100
commita06848c23759d8d8fad5abe19351262eb859e086 (patch)
tree155a32ca40f0f63735ffed0f66efdc7e35d515a5 /core/profile.c
parent8d0361ff77707b9cae7c6bea6109c776afd6e2a6 (diff)
downloadsubsurface-a06848c23759d8d8fad5abe19351262eb859e086.tar.gz
VPM-B: move bottom_time into deco_state
Removing ext variable from profile.c should facilitate future performance gains Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Diffstat (limited to 'core/profile.c')
-rw-r--r--core/profile.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/profile.c b/core/profile.c
index 9150f20dd..1e717f318 100644
--- a/core/profile.c
+++ b/core/profile.c
@@ -31,7 +31,6 @@ static struct plot_data *last_pi_entry_new = NULL;
void populate_pressure_information(struct dive *, struct divecomputer *, struct plot_info *, int);
extern bool in_planner();
-extern int bottom_time;
#ifdef DEBUG_PI
/* debugging tool - not normally used */
@@ -960,7 +959,7 @@ void calculate_deco_information(struct dive *dive, struct divecomputer *dc, stru
bool first_iteration = true;
int prev_deco_time = 10000000, time_deep_ceiling = 0;
if (in_planner())
- deco_time = pi->maxtime - bottom_time;
+ deco_time = pi->maxtime - deco_state->bottom_time;
else
deco_time = 0;
struct deco_state *cache_data_initial = NULL;