mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: move functions into struct dive
Nothing against free-standing functions, but in the case of dc_watertemp(), dc_airtemp(), endtime() and totaltime(), it seems natural to move this into the dive class and avoid polution of the global name space. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
b9df26066e
commit
a1e6df46d9
13 changed files with 63 additions and 64 deletions
|
@ -145,7 +145,7 @@ static const QString icon_names[4] = {
|
|||
static int countPhotos(const struct dive *d)
|
||||
{ // Determine whether dive has pictures, and whether they were taken during or before/after dive.
|
||||
const int bufperiod = 120; // A 2-min buffer period. Photos within 2 min of dive are assumed as
|
||||
int diveTotaltime = dive_endtime(d) - d->when; // taken during the dive, not before/after.
|
||||
int diveTotaltime = d->totaltime().seconds; // taken during the dive, not before/after.
|
||||
int pic_offset, icon_index = 0;
|
||||
for (auto &picture: d->pictures) { // Step through each of the pictures for this dive:
|
||||
pic_offset = picture.offset.seconds;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue