mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Remove unused variable for unit name in statistics calculations
The code was incorrect - and completely unnecessary. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e3088930ab
commit
55296e9dad
1 changed files with 3 additions and 4 deletions
|
@ -107,7 +107,7 @@ enum {
|
||||||
|
|
||||||
static char * get_time_string(int seconds, int maxdays);
|
static char * get_time_string(int seconds, int maxdays);
|
||||||
|
|
||||||
static void process_temperatures(struct dive *dp, stats_t *stats, const char *unit)
|
static void process_temperatures(struct dive *dp, stats_t *stats)
|
||||||
{
|
{
|
||||||
int min_temp, mean_temp, max_temp = 0;
|
int min_temp, mean_temp, max_temp = 0;
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ static void process_temperatures(struct dive *dp, stats_t *stats, const char *un
|
||||||
mean_temp = (mean_temp + max_temp) / 2;
|
mean_temp = (mean_temp + max_temp) / 2;
|
||||||
else
|
else
|
||||||
mean_temp = max_temp;
|
mean_temp = max_temp;
|
||||||
stats->combined_temp += get_temp_units(mean_temp, &unit);
|
stats->combined_temp += get_temp_units(mean_temp, NULL);
|
||||||
stats->combined_count++;
|
stats->combined_count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -141,7 +141,6 @@ static void process_temperatures(struct dive *dp, stats_t *stats, const char *un
|
||||||
static void process_dive(struct dive *dp, stats_t *stats)
|
static void process_dive(struct dive *dp, stats_t *stats)
|
||||||
{
|
{
|
||||||
int old_tt, sac_time = 0;
|
int old_tt, sac_time = 0;
|
||||||
const char *unit;
|
|
||||||
|
|
||||||
old_tt = stats->total_time.seconds;
|
old_tt = stats->total_time.seconds;
|
||||||
stats->total_time.seconds += dp->dc.duration.seconds;
|
stats->total_time.seconds += dp->dc.duration.seconds;
|
||||||
|
@ -154,7 +153,7 @@ static void process_dive(struct dive *dp, stats_t *stats)
|
||||||
if (stats->min_depth.mm == 0 || dp->dc.maxdepth.mm < stats->min_depth.mm)
|
if (stats->min_depth.mm == 0 || dp->dc.maxdepth.mm < stats->min_depth.mm)
|
||||||
stats->min_depth.mm = dp->dc.maxdepth.mm;
|
stats->min_depth.mm = dp->dc.maxdepth.mm;
|
||||||
|
|
||||||
process_temperatures(dp, stats, unit);
|
process_temperatures(dp, stats);
|
||||||
|
|
||||||
/* Maybe we should drop zero-duration dives */
|
/* Maybe we should drop zero-duration dives */
|
||||||
if (!dp->dc.duration.seconds)
|
if (!dp->dc.duration.seconds)
|
||||||
|
|
Loading…
Reference in a new issue