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:
Dirk Hohndel 2013-12-20 09:20:18 -08:00
parent f0da41c937
commit 4ab58d6b47
3 changed files with 4 additions and 15 deletions

View file

@ -35,6 +35,8 @@ QString get_trip_date_string(timestamp_t when, int nr);
extern DiveComputerList dcList;
#define M_OR_FT(_m,_f) ((prefs.units.length == units::METERS) ? ((_m) * 1000) : (feet_to_mm(_f)))
#if defined __APPLE__
#define TITLE_OR_TEXT(_t,_m) "", _t + "\n" + _m
#else