Forráskód Böngészése

Fixed gcc /mingw building

Léo Terziman 12 éve
szülő
commit
2c4e55ac61

+ 9 - 3
include/assimp/color4.inl

@@ -96,9 +96,15 @@ AI_FORCE_INLINE bool aiColor4t<TReal>::operator!= (const aiColor4t<TReal>& other
 template <typename TReal>
 AI_FORCE_INLINE bool aiColor4t<TReal>::operator< (const aiColor4t<TReal>& other) const {
 	return r < other.r || (
-		r == other.r && (g < other.g ||
-			g == other.g && (b < other.b ||
-				b == other.b && a < other.a
+		r == other.r && (
+			g < other.g || (
+				g == other.g && (
+					b < other.b || (
+						b == other.b && (
+							a < other.a
+						)
+					)
+				)
 			)
 		)
 	);

+ 1 - 1
include/assimp/matrix3x3.h

@@ -93,7 +93,7 @@ public:
 	bool operator== (const aiMatrix4x4t<TReal>& m) const;
 	bool operator!= (const aiMatrix4x4t<TReal>& m) const;
 
-	bool Equal(const aiMatrix4x4t<TReal>& m, float epsilon = 1e-6) const;
+	bool Equal(const aiMatrix4x4t<TReal>& m, TReal epsilon = 1e-6) const;
 
 	template <typename TOther>
 	operator aiMatrix3x3t<TOther> () const;

+ 2 - 1
include/assimp/matrix3x3.inl

@@ -50,6 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #include "matrix4x4.h"
 #include <algorithm>
+#include <cmath>
 #include <limits>
 
 // ------------------------------------------------------------------------------------------------
@@ -129,7 +130,7 @@ inline bool aiMatrix3x3t<TReal>::operator!= (const aiMatrix4x4t<TReal>& m) const
 
 // ---------------------------------------------------------------------------
 template<typename TReal>
-inline bool aiMatrix3x3t<TReal>::Equal(const aiMatrix4x4t<TReal>& m, float epsilon) const {
+inline bool aiMatrix3x3t<TReal>::Equal(const aiMatrix4x4t<TReal>& m, TReal epsilon) const {
 	return
 		std::abs(a1 - m.a1) <= epsilon &&
 		std::abs(a2 - m.a2) <= epsilon &&

+ 1 - 1
include/assimp/matrix4x4.h

@@ -97,7 +97,7 @@ public:
 	bool operator== (const aiMatrix4x4t& m) const;
 	bool operator!= (const aiMatrix4x4t& m) const;
 
-	bool Equal(const aiMatrix4x4t& m, float epsilon = 1e-6) const;
+	bool Equal(const aiMatrix4x4t& m, TReal epsilon = 1e-6) const;
 
 	// matrix multiplication. 
 	aiMatrix4x4t& operator *= (const aiMatrix4x4t& m);

+ 2 - 2
include/assimp/matrix4x4.inl

@@ -52,8 +52,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include "quaternion.h"
 
 #include <algorithm>
+#include <cmath>
 #include <limits>
-#include <math.h>
 
 // ----------------------------------------------------------------------------------------
 template <typename TReal>
@@ -271,7 +271,7 @@ inline bool aiMatrix4x4t<TReal>::operator!= (const aiMatrix4x4t<TReal>& m) const
 
 // ---------------------------------------------------------------------------
 template<typename TReal>
-inline bool aiMatrix4x4t<TReal>::Equal(const aiMatrix4x4t<TReal>& m, float epsilon) const {
+inline bool aiMatrix4x4t<TReal>::Equal(const aiMatrix4x4t<TReal>& m, TReal epsilon) const {
 	return
 		std::abs(a1 - m.a1) <= epsilon &&
 		std::abs(a2 - m.a2) <= epsilon &&

+ 1 - 1
include/assimp/quaternion.h

@@ -79,7 +79,7 @@ public:
 	bool operator== (const aiQuaterniont& o) const;
 	bool operator!= (const aiQuaterniont& o) const;
 
-	bool Equal(const aiQuaterniont& o, float epsilon = 1e-6) const;
+	bool Equal(const aiQuaterniont& o, TReal epsilon = 1e-6) const;
 
 public:
 

+ 3 - 1
include/assimp/quaternion.inl

@@ -48,6 +48,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifdef __cplusplus
 #include "quaternion.h"
 
+#include <cmath>
+
 // ---------------------------------------------------------------------------
 template<typename TReal>
 bool aiQuaterniont<TReal>::operator== (const aiQuaterniont& o) const
@@ -64,7 +66,7 @@ bool aiQuaterniont<TReal>::operator!= (const aiQuaterniont& o) const
 
 // ---------------------------------------------------------------------------
 template<typename TReal>
-inline bool aiQuaterniont<TReal>::Equal(const aiQuaterniont& o, float epsilon) const {
+inline bool aiQuaterniont<TReal>::Equal(const aiQuaterniont& o, TReal epsilon) const {
 	return
 		std::abs(x - o.x) <= epsilon &&
 		std::abs(y - o.y) <= epsilon &&

+ 1 - 3
include/assimp/vector2.h

@@ -44,8 +44,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef AI_VECTOR2D_H_INC
 #define AI_VECTOR2D_H_INC
 
-#include <math.h>
-
 #include "./Compiler/pushpack1.h"
 
 // ----------------------------------------------------------------------------------
@@ -83,7 +81,7 @@ public:
 	bool operator== (const aiVector2t& other) const;
 	bool operator!= (const aiVector2t& other) const;
 
-	bool Equal(const aiVector2t& other, float epsilon = 1e-6) const;
+	bool Equal(const aiVector2t& other, TReal epsilon = 1e-6) const;
 
 	aiVector2t& operator= (TReal f);
 	const aiVector2t SymMul(const aiVector2t& o);

+ 3 - 1
include/assimp/vector2.inl

@@ -48,6 +48,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifdef __cplusplus
 #include "vector2.h"
 
+#include <cmath>
+
 // ------------------------------------------------------------------------------------------------
 template <typename TReal>
 template <typename TOther>
@@ -133,7 +135,7 @@ bool aiVector2t<TReal>::operator!= (const aiVector2t& other) const {
 
 // ---------------------------------------------------------------------------
 template<typename TReal>
-bool aiVector2t<TReal>::Equal(const aiVector2t& other, float epsilon) const {
+bool aiVector2t<TReal>::Equal(const aiVector2t& other, TReal epsilon) const {
 	return
 		std::abs(x - other.x) <= epsilon &&
 		std::abs(y - other.y) <= epsilon;

+ 1 - 4
include/assimp/vector3.h

@@ -44,9 +44,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifndef AI_VECTOR3D_H_INC
 #define AI_VECTOR3D_H_INC
 
-#include <math.h>
-
-
 #include "./Compiler/pushpack1.h"
 
 #ifdef __cplusplus
@@ -86,7 +83,7 @@ public:
 	bool operator== (const aiVector3t& other) const;
 	bool operator!= (const aiVector3t& other) const;
 
-	bool Equal(const aiVector3t& other, float epsilon = 1e-6) const;
+	bool Equal(const aiVector3t& other, TReal epsilon = 1e-6) const;
 
 	template <typename TOther>
 	operator aiVector3t<TOther> () const;

+ 3 - 1
include/assimp/vector3.inl

@@ -48,6 +48,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #ifdef __cplusplus
 #include "vector3.h"
 
+#include <cmath>
+
 // ------------------------------------------------------------------------------------------------
 /** Transformation of a vector by a 3x3 matrix */
 template <typename TReal>
@@ -149,7 +151,7 @@ AI_FORCE_INLINE bool aiVector3t<TReal>::operator!= (const aiVector3t<TReal>& oth
 }
 // ---------------------------------------------------------------------------
 template<typename TReal>
-AI_FORCE_INLINE bool aiVector3t<TReal>::Equal(const aiVector3t<TReal>& other, float epsilon) const {
+AI_FORCE_INLINE bool aiVector3t<TReal>::Equal(const aiVector3t<TReal>& other, TReal epsilon) const {
 	return
 		std::abs(x - other.x) <= epsilon &&
 		std::abs(y - other.y) <= epsilon &&