[Bf-blender-cvs] [d578ad6] compositor-2016: Fix GCC/Linux build error after finite/isfinite changes.

Brecht Van Lommel noreply at git.blender.org
Wed Jun 8 21:47:38 CEST 2016


Commit: d578ad69f6f6ce4dd98876da59ecfe5100bc50c1
Author: Brecht Van Lommel
Date:   Tue May 17 23:16:54 2016 +0200
Branches: compositor-2016
https://developer.blender.org/rBd578ad69f6f6ce4dd98876da59ecfe5100bc50c1

Fix GCC/Linux build error after finite/isfinite changes.

===================================================================

M	source/blender/blenlib/BLI_math_vector.h
M	source/blender/blenlib/intern/math_vector.c
M	source/blender/blenlib/intern/math_vector_inline.c

===================================================================

diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h
index c44fcf4..5f76b79 100644
--- a/source/blender/blenlib/BLI_math_vector.h
+++ b/source/blender/blenlib/BLI_math_vector.h
@@ -237,9 +237,9 @@ MINLINE bool is_zero_v2(const float a[3])  ATTR_WARN_UNUSED_RESULT;
 MINLINE bool is_zero_v3(const float a[3])  ATTR_WARN_UNUSED_RESULT;
 MINLINE bool is_zero_v4(const float a[4])  ATTR_WARN_UNUSED_RESULT;
 
-MINLINE bool is_finite_v2(const float a[3])  ATTR_WARN_UNUSED_RESULT;
-MINLINE bool is_finite_v3(const float a[3])  ATTR_WARN_UNUSED_RESULT;
-MINLINE bool is_finite_v4(const float a[4])  ATTR_WARN_UNUSED_RESULT;
+bool is_finite_v2(const float a[3])  ATTR_WARN_UNUSED_RESULT;
+bool is_finite_v3(const float a[3])  ATTR_WARN_UNUSED_RESULT;
+bool is_finite_v4(const float a[4])  ATTR_WARN_UNUSED_RESULT;
 
 MINLINE bool is_one_v3(const float a[3])  ATTR_WARN_UNUSED_RESULT;
 
diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c
index 46e25fc..7f2db37 100644
--- a/source/blender/blenlib/intern/math_vector.c
+++ b/source/blender/blenlib/intern/math_vector.c
@@ -336,6 +336,25 @@ void flip_v2_v2v2(float v[2], const float v1[2], const float v2[2])
 	v[1] = v1[1] + (v1[1] - v2[1]);
 }
 
+
+/********************************* Comparison ********************************/
+
+bool is_finite_v2(const float v[2])
+{
+	return (isfinite(v[0]) && isfinite(v[1]));
+}
+
+bool is_finite_v3(const float v[3])
+{
+	return (isfinite(v[0]) && isfinite(v[1]) && isfinite(v[2]));
+}
+
+bool is_finite_v4(const float v[4])
+{
+	return (isfinite(v[0]) && isfinite(v[1]) && isfinite(v[2]) && isfinite(v[3]));
+}
+
+
 /********************************** Angles ***********************************/
 
 /* Return the angle in radians between vecs 1-2 and 2-3 in radians
diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c
index 76f2af3..b43fb6e 100644
--- a/source/blender/blenlib/intern/math_vector_inline.c
+++ b/source/blender/blenlib/intern/math_vector_inline.c
@@ -952,21 +952,6 @@ MINLINE bool is_zero_v4(const float v[4])
 	return (v[0] == 0.0f && v[1] == 0.0f && v[2] == 0.0f && v[3] == 0.0f);
 }
 
-MINLINE bool is_finite_v2(const float v[2])
-{
-	return (isfinite(v[0]) && isfinite(v[1]));
-}
-
-MINLINE bool is_finite_v3(const float v[3])
-{
-	return (isfinite(v[0]) && isfinite(v[1]) && isfinite(v[2]));
-}
-
-MINLINE bool is_finite_v4(const float v[4])
-{
-	return (isfinite(v[0]) && isfinite(v[1]) && isfinite(v[2]) && isfinite(v[3]));
-}
-
 MINLINE bool is_one_v3(const float v[3])
 {
 	return (v[0] == 1.0f && v[1] == 1.0f && v[2] == 1.0f);




More information about the Bf-blender-cvs mailing list