paparazzi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paparazzi-commits] [6080] Add some _ to macro local scope variables nam


From: Allen Ibara
Subject: [paparazzi-commits] [6080] Add some _ to macro local scope variables names to prevent shadowing
Date: Wed, 06 Oct 2010 04:38:27 +0000

Revision: 6080
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=6080
Author:   aibara
Date:     2010-10-06 04:38:27 +0000 (Wed, 06 Oct 2010)
Log Message:
-----------
Add some _ to macro local scope variables names to prevent shadowing 

Modified Paths:
--------------
    paparazzi3/trunk/sw/airborne/math/pprz_algebra_float.h

Modified: paparazzi3/trunk/sw/airborne/math/pprz_algebra_float.h
===================================================================
--- paparazzi3/trunk/sw/airborne/math/pprz_algebra_float.h      2010-10-06 
04:37:34 UTC (rev 6079)
+++ paparazzi3/trunk/sw/airborne/math/pprz_algebra_float.h      2010-10-06 
04:38:27 UTC (rev 6080)
@@ -341,26 +341,26 @@
   }
 #else
 #define FLOAT_RMAT_OF_QUAT(_rm, _q) {                                  \
-       const float a = M_SQRT2*(_q).qi;                                \
-       const float b = M_SQRT2*(_q).qx;                                \
-       const float c = M_SQRT2*(_q).qy;                                \
-       const float d = M_SQRT2*(_q).qz;                                \
-       const float a2_1 = a*a-1;                                       \
-       const float ab = a*b;                                           \
-       const float ac = a*c;                                           \
-       const float ad = a*d;                                           \
-       const float bc = b*c;                                           \
-       const float bd = b*d;                                           \
-       const float cd = c*d;                                           \
-    RMAT_ELMT(_rm, 0, 0) = a2_1+b*b;                                   \
+       const float _a = M_SQRT2*(_q).qi;                               \
+       const float _b = M_SQRT2*(_q).qx;                               \
+       const float _c = M_SQRT2*(_q).qy;                               \
+       const float _d = M_SQRT2*(_q).qz;                               \
+       const float a2_1 = _a*_a-1;                                     \
+       const float ab = _a*_b;                                         \
+       const float ac = _a*_c;                                         \
+       const float ad = _a*_d;                                         \
+       const float bc = _b*_c;                                         \
+       const float bd = _b*_d;                                         \
+       const float cd = _c*_d;                                         \
+    RMAT_ELMT(_rm, 0, 0) = a2_1+_b*_b;                                 \
     RMAT_ELMT(_rm, 0, 1) = bc+ad;                                      \
     RMAT_ELMT(_rm, 0, 2) = bd-ac;                                      \
     RMAT_ELMT(_rm, 1, 0) = bc-ad;                                      \
-    RMAT_ELMT(_rm, 1, 1) = a2_1+c*c;                                   \
+    RMAT_ELMT(_rm, 1, 1) = a2_1+_c*_c;                                 \
     RMAT_ELMT(_rm, 1, 2) = cd+ab;                                      \
     RMAT_ELMT(_rm, 2, 0) = bd+ac;                                      \
     RMAT_ELMT(_rm, 2, 1) = cd-ab;                                      \
-    RMAT_ELMT(_rm, 2, 2) = a2_1+d*d;                                   \
+    RMAT_ELMT(_rm, 2, 2) = a2_1+_d*_d;                                 \
   }
 #endif
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]