summaryrefslogtreecommitdiffstats
path: root/core/statistics.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-10-06 16:30:57 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-10-07 17:50:51 +0300
commitb61f6f66d8859e62023e3818879b90de529e9a72 (patch)
tree3f504976833a99d518886f0059ca6b28504b8c8b /core/statistics.h
parent97991e2b9fff4254c2b40417bf6d7496ba0d849f (diff)
downloadsubsurface-b61f6f66d8859e62023e3818879b90de529e9a72.tar.gz
Statistics: un-globalize stats_selection
The statistics of the selected dives were calculated a) into a global objects and b) at a completely different place than where they're used. There's no plausible reason for either. There fore render into a caller-provided structure at the place of use. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/statistics.h')
-rw-r--r--core/statistics.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/statistics.h b/core/statistics.h
index 4639ecf3f..d0cf5ab67 100644
--- a/core/statistics.h
+++ b/core/statistics.h
@@ -37,7 +37,6 @@ typedef struct
bool is_trip;
char *location;
} stats_t;
-extern stats_t stats_selection;
struct stats_summary {
stats_t *stats_yearly;
@@ -54,9 +53,9 @@ extern char *get_minutes(int seconds);
extern void init_stats_summary(struct stats_summary *stats);
extern void free_stats_summary(struct stats_summary *stats);
extern void calculate_stats_summary(struct stats_summary *stats);
+extern void calculate_stats_selected(stats_t *stats_selection);
extern void get_gas_used(struct dive *dive, volume_t gases[MAX_CYLINDERS]);
-extern void process_selected_dives(void);
-void selected_dives_gas_parts(volume_t *o2_tot, volume_t *he_tot);
+extern void selected_dives_gas_parts(volume_t *o2_tot, volume_t *he_tot);
#ifdef __cplusplus
}