From 9ac936f269ba5b2a62798014f2054eb6462a05af Mon Sep 17 00:00:00 2001 From: Guilhem Bonnefille Date: Sat, 25 Sep 2010 13:47:41 +0200 Subject: [PATCH] Fix arithmetic macro definition cpp macro are only text substitutions. We have to ensure VIK_METERS_TO_FEET(3+1) will do what coder expect. --- src/globals.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/globals.h b/src/globals.h index 8d8258fa..8e0aa0b1 100644 --- a/src/globals.h +++ b/src/globals.h @@ -33,7 +33,7 @@ #define MPP_TO_ALTI 0.7134044 #define VIK_FEET_IN_METER 3.2808399 -#define VIK_METERS_TO_FEET(X) (X*VIK_FEET_IN_METER) +#define VIK_METERS_TO_FEET(X) ((X)*VIK_FEET_IN_METER) #define VIK_DEFAULT_ALTITUDE 0.0 #define VIK_DEFAULT_DOP 0.0 -- 2.39.5