mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
cleanup: move minute formating to format-string.cpp
The get_minutes() function formats a time as m:ss and returns a static C-string. Since all callers are C++ anyway and transform directly into QString, let us move this to the other string formatting function. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
1047937197
commit
4a7ee872f3
7 changed files with 17 additions and 18 deletions
|
|
@ -2,7 +2,6 @@
|
|||
/* statistics.c
|
||||
*
|
||||
* core logic for the Info & Stats page -
|
||||
* char *get_minutes(int seconds);
|
||||
* void calculate_stats_summary(struct stats_summary *out, bool selected_only);
|
||||
* void calculate_stats_selected(stats_t *stats_selection);
|
||||
*/
|
||||
|
|
@ -84,13 +83,6 @@ static void process_dive(struct dive *dive, stats_t *stats)
|
|||
}
|
||||
}
|
||||
|
||||
char *get_minutes(int seconds)
|
||||
{
|
||||
static char buf[80];
|
||||
snprintf(buf, sizeof(buf), "%d:%.2d", FRACTION(seconds, 60));
|
||||
return buf;
|
||||
}
|
||||
|
||||
/*
|
||||
* Calculate a summary of the statistics and put in the stats_summary
|
||||
* structure provided in the first parameter.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue