diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-09-01 19:01:15 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-09-01 19:01:15 +0400 |
commit | 35b61a7512dc1b8b1d8bc562aad2a72d254b8a69 (patch) | |
tree | 5050db48823af6cf23eee62b5a013e2f208fdded /source/blender/blenlib/BLI_math_geom.h | |
parent | 901dea87a1266479d3b7aab6cfd2d5fbf6adc393 (diff) |
Move GCC attributes into a centraized defines
Instead of having ifdef __GNUC__ all over the headers
to use special compiler's hints use a special file where
all things like this are concentrated.
Makes code easier to follow and allows to manage special
attributes in more efficient way.
Thanks Campbell for review!
Diffstat (limited to 'source/blender/blenlib/BLI_math_geom.h')
-rw-r--r-- | source/blender/blenlib/BLI_math_geom.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h index 559157370ca..d3f6c7ef14b 100644 --- a/source/blender/blenlib/BLI_math_geom.h +++ b/source/blender/blenlib/BLI_math_geom.h @@ -34,6 +34,7 @@ extern "C" { #endif +#include "BLI_compiler_attrs.h" #include "BLI_math_inline.h" #if BLI_MATH_DO_INLINE @@ -293,11 +294,7 @@ float form_factor_hemi_poly(float p[3], float n[3], bool axis_dominant_v3_to_m3(float r_mat[3][3], const float normal[3]); void axis_dominant_v3(int *r_axis_a, int *r_axis_b, const float axis[3]); -float axis_dominant_v3_max(int *r_axis_a, int *r_axis_b, const float axis[3]) -#ifdef __GNUC__ -__attribute__((warn_unused_result)) -#endif -; +float axis_dominant_v3_max(int *r_axis_a, int *r_axis_b, const float axis[3]) ATTR_WARN_UNUSED_RESULT; MINLINE int max_axis_v3(const float vec[3]); MINLINE int min_axis_v3(const float vec[3]); |