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
|
@ -116,13 +116,13 @@ static void save_dive_temperature(struct membuffer *b, struct dive *dive)
|
|||
{
|
||||
if (!dive->airtemp.mkelvin && !dive->watertemp.mkelvin)
|
||||
return;
|
||||
if (dive->airtemp.mkelvin == dc_airtemp(dive).mkelvin && dive->watertemp.mkelvin == dc_watertemp(dive).mkelvin)
|
||||
if (dive->airtemp.mkelvin == dive->dc_airtemp().mkelvin && dive->watertemp.mkelvin == dive->dc_watertemp().mkelvin)
|
||||
return;
|
||||
|
||||
put_string(b, " <divetemperature");
|
||||
if (dive->airtemp.mkelvin != dc_airtemp(dive).mkelvin)
|
||||
if (dive->airtemp.mkelvin != dive->dc_airtemp().mkelvin)
|
||||
put_temperature(b, dive->airtemp, " air='", " C'");
|
||||
if (dive->watertemp.mkelvin != dc_watertemp(dive).mkelvin)
|
||||
if (dive->watertemp.mkelvin != dive->dc_watertemp().mkelvin)
|
||||
put_temperature(b, dive->watertemp, " water='", " C'");
|
||||
put_string(b, "/>\n");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue