From 200ed75578d79bd7a3dbf9c19fb5ffa4b7b3e116 Mon Sep 17 00:00:00 2001 From: bugmaster Date: Fri, 17 Jan 2014 15:27:10 +0400 Subject: [PATCH] Correction for Fedora 18 64 bit issue 24473 --- src/NCollection/NCollection_Vec2.hxx | 8 ++++---- src/NCollection/NCollection_Vec3.hxx | 12 ++++++------ src/NCollection/NCollection_Vec4.hxx | 16 ++++++++-------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/NCollection/NCollection_Vec2.hxx b/src/NCollection/NCollection_Vec2.hxx index c7abfdecf5..289a7eceed 100644 --- a/src/NCollection/NCollection_Vec2.hxx +++ b/src/NCollection/NCollection_Vec2.hxx @@ -164,15 +164,15 @@ public: //! Compute component-wise minimum of two vectors. NCollection_Vec2 cwiseMin (const NCollection_Vec2& theVec) const { - return NCollection_Vec2 (Min (v[0], theVec.v[0]), - Min (v[1], theVec.v[1])); + return NCollection_Vec2 (v[0] < theVec.v[0] ? v[0] : theVec.v[0], + v[1] < theVec.v[1] ? v[1] : theVec.v[1]); } //! Compute component-wise maximum of two vectors. NCollection_Vec2 cwiseMax (const NCollection_Vec2& theVec) const { - return NCollection_Vec2 (Max (v[0], theVec.v[0]), - Max (v[1], theVec.v[1])); + return NCollection_Vec2 (v[0] > theVec.v[0] ? v[0] : theVec.v[0], + v[1] > theVec.v[1] ? v[1] : theVec.v[1]); } //! Compute per-component multiplication by scale factor. diff --git a/src/NCollection/NCollection_Vec3.hxx b/src/NCollection/NCollection_Vec3.hxx index fdc9bad4ff..5f93b7cd86 100644 --- a/src/NCollection/NCollection_Vec3.hxx +++ b/src/NCollection/NCollection_Vec3.hxx @@ -237,17 +237,17 @@ public: //! Compute component-wise minimum of two vectors. NCollection_Vec3 cwiseMin (const NCollection_Vec3& theVec) const { - return NCollection_Vec3 (Min (v[0], theVec.v[0]), - Min (v[1], theVec.v[1]), - Min (v[2], theVec.v[2])); + return NCollection_Vec3 (v[0] < theVec.v[0] ? v[0] : theVec.v[0], + v[1] < theVec.v[1] ? v[1] : theVec.v[1], + v[2] < theVec.v[2] ? v[2] : theVec.v[2]); } //! Compute component-wise maximum of two vectors. NCollection_Vec3 cwiseMax (const NCollection_Vec3& theVec) const { - return NCollection_Vec3 (Max (v[0], theVec.v[0]), - Max (v[1], theVec.v[1]), - Max (v[2], theVec.v[2])); + return NCollection_Vec3 (v[0] > theVec.v[0] ? v[0] : theVec.v[0], + v[1] > theVec.v[1] ? v[1] : theVec.v[1], + v[2] > theVec.v[2] ? v[2] : theVec.v[2]); } //! Compute per-component division by scale factor. diff --git a/src/NCollection/NCollection_Vec4.hxx b/src/NCollection/NCollection_Vec4.hxx index 234ec45cc4..c1d0054cb5 100644 --- a/src/NCollection/NCollection_Vec4.hxx +++ b/src/NCollection/NCollection_Vec4.hxx @@ -287,19 +287,19 @@ public: //! Compute component-wise minimum of two vectors. NCollection_Vec4 cwiseMin (const NCollection_Vec4& theVec) const { - return NCollection_Vec4 (Min (v[0], theVec.v[0]), - Min (v[1], theVec.v[1]), - Min (v[2], theVec.v[2]), - Min (v[3], theVec.v[3])); + return NCollection_Vec4 (v[0] < theVec.v[0] ? v[0] : theVec.v[0], + v[1] < theVec.v[1] ? v[1] : theVec.v[1], + v[2] < theVec.v[2] ? v[2] : theVec.v[2], + v[3] < theVec.v[3] ? v[3] : theVec.v[3]); } //! Compute component-wise maximum of two vectors. NCollection_Vec4 cwiseMax (const NCollection_Vec4& theVec) const { - return NCollection_Vec4 (Max (v[0], theVec.v[0]), - Max (v[1], theVec.v[1]), - Max (v[2], theVec.v[2]), - Max (v[3], theVec.v[3])); + return NCollection_Vec4 (v[0] > theVec.v[0] ? v[0] : theVec.v[0], + v[1] > theVec.v[1] ? v[1] : theVec.v[1], + v[2] > theVec.v[2] ? v[2] : theVec.v[2], + v[3] > theVec.v[3] ? v[3] : theVec.v[3]); } //! Compute per-component division by scale factor.