mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Use M_OR_FT macro instead of switch statement
This is easier to read and also avoids an incorrect gcc warning. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f0da41c937
commit
4ab58d6b47
3 changed files with 4 additions and 15 deletions
|
@ -30,8 +30,6 @@
|
|||
#define MAX_DEPTH M_OR_FT(150, 450)
|
||||
#define MIN_DEPTH M_OR_FT(20, 60)
|
||||
|
||||
#define M_OR_FT(_m,_f) ((prefs.units.length == units::METERS) ? ((_m) * 1000) : (feet_to_mm(_f)))
|
||||
|
||||
QString gasToStr(const int o2Permille, const int hePermille) {
|
||||
uint o2 = (o2Permille + 5) / 10, he = (hePermille + 5) / 10;
|
||||
QString result = is_air(o2Permille, hePermille) ? QObject::tr("AIR")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue