code cleanup

* correct cmake/clang warning.
* use same include guard names as everywhere else for BLI math inline.
* correct define for madd_sh_shfl
This commit is contained in:
Campbell Barton 2012-02-25 09:02:05 +00:00
parent 57fd1fe00e
commit c955272ec5
5 changed files with 16 additions and 20 deletions

@ -1498,7 +1498,7 @@ endif()
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()

@ -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 @@ MINLINE float signf(float f)
}
#endif /* BLI_MATH_BASE_INLINE_H */
#endif /* __MATH_BASE_INLINE_C__ */

@ -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 @@ MINLINE void srgb_to_linearrgb_uchar4_predivide(float linear[4], const unsigned
srgb_to_linearrgb_predivide_v4(linear, fsrgb);
}
#endif /* BLI_MATH_COLOR_INLINE_H */
#endif /* __MATH_COLOR_INLINE_C__ */

@ -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 dot_shsh(float a[9], float b[9])
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 float diffuse_shv3(float sh[9], const float v[3])
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 @@ MINLINE float eval_shv3(float sh[9], const float v[3])
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 @@ MINLINE void madd_sh_shfl(float r[9], const float sh[3], const float f)
add_sh_shsh(r, r, tmp);
}
#endif /* BLI_MATH_GEOM_INLINE_H */
#endif /* __MATH_GEOM_INLINE_C__ */

@ -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 @@ MINLINE float line_point_side_v2(const float l1[2], const float l2[2], const flo
((l2[0]-pt[0]) * (l1[1]-pt[1]));
}
#endif /* BLI_MATH_VECTOR_INLINE_H */
#endif /* __MATH_VECTOR_INLINE_C__ */