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
64945a1c96
commit
e9c14c523c
11 changed files with 105 additions and 97 deletions
|
@ -199,3 +199,8 @@ unsigned int get_distance(location_t loc1, location_t loc2)
|
|||
return lrint(6371000 * c);
|
||||
}
|
||||
|
||||
depth_t m_or_ft(int m, int ft)
|
||||
{
|
||||
int mm = prefs.units.length == units::METERS ? m * 1000 : feet_to_mm(ft);
|
||||
return depth_t::from_base(mm);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue