mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
general: simplify a few unit manipulations
Now that we have defined addition and subtraction on unit classes, let's use them in a few examples. Yes, some of these are a bit pointless, because they are of the kind a.mbar - b.mbar => (a-b).mbar However, these probably should be further simplified by storing the result in a unit type. This commit is mostly a proof-of-concept. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
729cc16fc5
commit
110e64bc66
14 changed files with 59 additions and 68 deletions
|
@ -1133,7 +1133,7 @@ bool QMLManager::checkDuration(struct dive *d, QString duration)
|
|||
} else if (m6.hasMatch()) {
|
||||
m = m6.captured(1).toInt();
|
||||
}
|
||||
d->dcs[0].duration.seconds = d->duration.seconds = h * 3600 + m * 60 + s;
|
||||
d->dcs[0].duration = d->duration = duration_t { .seconds = h * 3600 + m * 60 + s };
|
||||
if (is_dc_manually_added_dive(&d->dcs[0]))
|
||||
d->dcs[0].samples.clear();
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue