aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-16 09:35:48 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-07-16 09:35:48 -0700
commit598102c351fff7868f9f0529944ad6bb30a9df69 (patch)
tree5e10f756724f4f5e71286f6b1ac74d640a80490f
parent138da489c8196a7c3efde12924b2c22ef4daa48c (diff)
downloadsubsurface-598102c351fff7868f9f0529944ad6bb30a9df69.tar.gz
Convert ternary "?:" into if for translation tools to work
It seems the translation tools don't like the ?: in the argument - can't blame them. So use an explicit if clause instead. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--dive.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/dive.c b/dive.c
index b303f2399..b39634d5e 100644
--- a/dive.c
+++ b/dive.c
@@ -227,11 +227,17 @@ double get_vertical_speed_units(unsigned int mms, int *frac, const char **units)
case METERS:
default:
d = mms / 1000.0 * time_factor;
- unit = translate("gettextFromC", (units_p->vertical_speed_time == MINUTES) ? "m/min" : "m/s");
+ if (units_p->vertical_speed_time == MINUTES)
+ unit = translate("gettextFromC", "m/min");
+ else
+ unit = translate("gettextFromC", "m/s");
break;
case FEET:
d = mm_to_feet(mms) * time_factor;
- unit = translate("gettextFromC", (units_p->vertical_speed_time == MINUTES) ? "ft/min" : "ft/s");
+ if (units_p->vertical_speed_time == MINUTES)
+ unit = translate("gettextFromC", "ft/min");
+ else
+ unit = translate("gettextFromC", "ft/s");
break;
}
if (frac)