mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: turn M_OR_FT macro into a function
No point in this being a macro. Make it return a depth_t - it was unclear that this returns a depth in mm. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
0e77dd9a68
commit
bd2f7e72f1
11 changed files with 105 additions and 97 deletions
|
@ -314,7 +314,7 @@ void reset_cylinders(struct dive *dive, bool track_gas)
|
|||
|
||||
for (cylinder_t &cyl: dive->cylinders) {
|
||||
if (cyl.depth.mm == 0) /* if the gas doesn't give a mod, calculate based on prefs */
|
||||
cyl.depth = dive->gas_mod(cyl.gasmix, decopo2, M_OR_FT(3,10));
|
||||
cyl.depth = dive->gas_mod(cyl.gasmix, decopo2, m_or_ft(3, 10).mm);
|
||||
if (track_gas)
|
||||
cyl.start.mbar = cyl.end.mbar = cyl.type.workingpressure.mbar;
|
||||
cyl.gas_used = 0_l;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue