[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44422] trunk/blender: code cleanup

Campbell Barton ideasman42 at gmail.com
Sat Feb 25 10:02:25 CET 2012


Revision: 44422
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44422
Author:   campbellbarton
Date:     2012-02-25 09:02:05 +0000 (Sat, 25 Feb 2012)
Log Message:
-----------
code cleanup
* correct cmake/clang warning.
* use same include guard names as everywhere else for BLI math inline.
* correct define for madd_sh_shfl

Modified Paths:
--------------
    trunk/blender/CMakeLists.txt
    trunk/blender/source/blender/blenlib/intern/math_base_inline.c
    trunk/blender/source/blender/blenlib/intern/math_color_inline.c
    trunk/blender/source/blender/blenlib/intern/math_geom_inline.c
    trunk/blender/source/blender/blenlib/intern/math_vector_inline.c

Modified: trunk/blender/CMakeLists.txt
===================================================================
--- trunk/blender/CMakeLists.txt	2012-02-25 08:37:51 UTC (rev 44421)
+++ trunk/blender/CMakeLists.txt	2012-02-25 09:02:05 UTC (rev 44422)
@@ -1498,7 +1498,7 @@
 
 if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
 	if(WITH_IK_ITASC)
-		message(WARNING "Using Clang as CXX compiler: disabling WITH_IK_ITASC and WITH_MOD_FLUID, these features will be missing.")
+		message(WARNING "Using Clang as CXX compiler: disabling WITH_IK_ITASC, this feature will be missing.")
 		set(WITH_IK_ITASC OFF)
 	endif()
 endif()

Modified: trunk/blender/source/blender/blenlib/intern/math_base_inline.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/math_base_inline.c	2012-02-25 08:37:51 UTC (rev 44421)
+++ trunk/blender/source/blender/blenlib/intern/math_base_inline.c	2012-02-25 09:02:05 UTC (rev 44422)
@@ -35,8 +35,8 @@
 
 #include "BLI_math.h"
 
-#ifndef BLI_MATH_BASE_INLINE_H
-#define BLI_MATH_BASE_INLINE_H
+#ifndef __MATH_BASE_INLINE_C__
+#define __MATH_BASE_INLINE_C__
 
 /* A few small defines. Keep'em local! */
 #define SMALL_NUMBER	1.e-8f
@@ -156,5 +156,4 @@
 }
 
 
-#endif /* BLI_MATH_BASE_INLINE_H */
-
+#endif /* __MATH_BASE_INLINE_C__ */

Modified: trunk/blender/source/blender/blenlib/intern/math_color_inline.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/math_color_inline.c	2012-02-25 08:37:51 UTC (rev 44421)
+++ trunk/blender/source/blender/blenlib/intern/math_color_inline.c	2012-02-25 09:02:05 UTC (rev 44422)
@@ -31,8 +31,8 @@
 #include "BLI_math_color.h"
 #include "BLI_utildefines.h"
 
-#ifndef BLI_MATH_COLOR_INLINE_H
-#define BLI_MATH_COLOR_INLINE_H
+#ifndef __MATH_COLOR_INLINE_C__
+#define __MATH_COLOR_INLINE_C__
 
 /******************************** Color Space ********************************/
 
@@ -193,5 +193,4 @@
 	srgb_to_linearrgb_predivide_v4(linear, fsrgb);
 }
 
-#endif /* BLI_MATH_COLOR_INLINE_H */
-
+#endif /* __MATH_COLOR_INLINE_C__ */

Modified: trunk/blender/source/blender/blenlib/intern/math_geom_inline.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/math_geom_inline.c	2012-02-25 08:37:51 UTC (rev 44421)
+++ trunk/blender/source/blender/blenlib/intern/math_geom_inline.c	2012-02-25 09:02:05 UTC (rev 44422)
@@ -30,8 +30,8 @@
 
 #include "BLI_math.h"
 
-#ifndef BLI_MATH_GEOM_INLINE_H
-#define BLI_MATH_GEOM_INLINE_H
+#ifndef __MATH_GEOM_INLINE_C__
+#define __MATH_GEOM_INLINE_C__
 
 /****************************** Spherical Harmonics **************************/
 
@@ -75,7 +75,7 @@
 MINLINE float diffuse_shv3(float sh[9], const float v[3])
 {
 	/* See formula (13) in:
-	   "An Efficient Representation for Irradiance Environment Maps" */
+	 * "An Efficient Representation for Irradiance Environment Maps" */
 	static const float c1 = 0.429043f, c2 = 0.511664f, c3 = 0.743125f;
 	static const float c4 = 0.886227f, c5 = 0.247708f;
 	float x, y, z, sum;
@@ -97,7 +97,7 @@
 MINLINE void vec_fac_to_sh(float r[9], const float v[3], const float f)
 {
 	/* See formula (3) in:
-	   "An Efficient Representation for Irradiance Environment Maps" */
+	 * "An Efficient Representation for Irradiance Environment Maps" */
 	float sh[9], x, y, z;
 
 	x= v[0];
@@ -128,7 +128,7 @@
 	return dot_shsh(tmp, sh);
 }
 
-MINLINE void madd_sh_shfl(float r[9], const float sh[3], const float f)
+MINLINE void madd_sh_shfl(float r[9], const float sh[9], const float f)
 {
 	float tmp[9];
 
@@ -137,5 +137,4 @@
 	add_sh_shsh(r, r, tmp);
 }
 
-#endif /* BLI_MATH_GEOM_INLINE_H */
-
+#endif /* __MATH_GEOM_INLINE_C__ */

Modified: trunk/blender/source/blender/blenlib/intern/math_vector_inline.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/math_vector_inline.c	2012-02-25 08:37:51 UTC (rev 44421)
+++ trunk/blender/source/blender/blenlib/intern/math_vector_inline.c	2012-02-25 09:02:05 UTC (rev 44422)
@@ -30,8 +30,8 @@
 
 #include "BLI_math.h"
 
-#ifndef BLI_MATH_VECTOR_INLINE_H
-#define BLI_MATH_VECTOR_INLINE_H
+#ifndef __MATH_VECTOR_INLINE_C__
+#define __MATH_VECTOR_INLINE_C__
 
 /********************************** Init *************************************/
 
@@ -627,5 +627,4 @@
 			((l2[0]-pt[0]) * (l1[1]-pt[1]));
 }
 
-#endif /* BLI_MATH_VECTOR_INLINE_H */
-
+#endif /* __MATH_VECTOR_INLINE_C__ */




More information about the Bf-blender-cvs mailing list