[freecad] 03/05: Fix compilation with clang. (Closes: #755305)
Anton Gladky
gladk at moszumanska.debian.org
Sun Aug 24 10:05:53 UTC 2014
This is an automated email from the git hooks/post-receive script.
gladk pushed a commit to branch master
in repository freecad.
commit efc7d53ed448b750582b1662f8a3b23a9aa50242
Author: Alexander <sanek23994 at gmail.com>
Date: Sat Aug 23 23:52:48 2014 +0200
Fix compilation with clang. (Closes: #755305)
---
debian/patches/fix_clang_compilation.patch | 318 +++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 319 insertions(+)
diff --git a/debian/patches/fix_clang_compilation.patch b/debian/patches/fix_clang_compilation.patch
new file mode 100644
index 0000000..9c3d6a1
--- /dev/null
+++ b/debian/patches/fix_clang_compilation.patch
@@ -0,0 +1,318 @@
+Description: fixes compilation with clang
+Author: Alexander <sanek23994 at gmail.com>
+Bug-Debian: http://bugs.debian.org/755305
+Reviewed-By: Anton Gladky <gladk at debian.org>
+Last-Update: 2014-08-23
+
+--- freecad-0.14.3702+dfsg.orig/src/Mod/Robot/App/kdl_cp/frameacc.hpp
++++ freecad-0.14.3702+dfsg/src/Mod/Robot/App/kdl_cp/frameacc.hpp
+@@ -79,9 +79,9 @@ public:
+ IMETHOD friend VectorAcc operator / (const VectorAcc& r2,const doubleAcc& r1);
+
+
+- IMETHOD friend bool Equal(const VectorAcc& r1,const VectorAcc& r2,double eps=epsilon);
+- IMETHOD friend bool Equal(const Vector& r1,const VectorAcc& r2,double eps=epsilon);
+- IMETHOD friend bool Equal(const VectorAcc& r1,const Vector& r2,double eps=epsilon);
++ IMETHOD friend bool Equal(const VectorAcc& r1,const VectorAcc& r2,double eps);
++ IMETHOD friend bool Equal(const Vector& r1,const VectorAcc& r2,double eps);
++ IMETHOD friend bool Equal(const VectorAcc& r1,const Vector& r2,double eps);
+ IMETHOD friend VectorAcc operator - (const VectorAcc& r);
+ IMETHOD friend doubleAcc dot(const VectorAcc& lhs,const VectorAcc& rhs);
+ IMETHOD friend doubleAcc dot(const VectorAcc& lhs,const Vector& rhs);
+@@ -133,9 +133,9 @@ public:
+ IMETHOD friend RotationAcc operator* (const RotationAcc& r1,const RotationAcc& r2);
+ IMETHOD friend RotationAcc operator* (const Rotation& r1,const RotationAcc& r2);
+ IMETHOD friend RotationAcc operator* (const RotationAcc& r1,const Rotation& r2);
+- IMETHOD friend bool Equal(const RotationAcc& r1,const RotationAcc& r2,double eps=epsilon);
+- IMETHOD friend bool Equal(const Rotation& r1,const RotationAcc& r2,double eps=epsilon);
+- IMETHOD friend bool Equal(const RotationAcc& r1,const Rotation& r2,double eps=epsilon);
++ IMETHOD friend bool Equal(const RotationAcc& r1,const RotationAcc& r2,double eps);
++ IMETHOD friend bool Equal(const Rotation& r1,const RotationAcc& r2,double eps);
++ IMETHOD friend bool Equal(const RotationAcc& r1,const Rotation& r2,double eps);
+ IMETHOD TwistAcc Inverse(const TwistAcc& arg) const;
+ IMETHOD TwistAcc Inverse(const Twist& arg) const;
+ IMETHOD TwistAcc operator * (const TwistAcc& arg) const;
+@@ -171,9 +171,9 @@ public:
+ IMETHOD friend FrameAcc operator * (const FrameAcc& f1,const FrameAcc& f2);
+ IMETHOD friend FrameAcc operator * (const Frame& f1,const FrameAcc& f2);
+ IMETHOD friend FrameAcc operator * (const FrameAcc& f1,const Frame& f2);
+- IMETHOD friend bool Equal(const FrameAcc& r1,const FrameAcc& r2,double eps=epsilon);
+- IMETHOD friend bool Equal(const Frame& r1,const FrameAcc& r2,double eps=epsilon);
+- IMETHOD friend bool Equal(const FrameAcc& r1,const Frame& r2,double eps=epsilon);
++ IMETHOD friend bool Equal(const FrameAcc& r1,const FrameAcc& r2,double eps);
++ IMETHOD friend bool Equal(const Frame& r1,const FrameAcc& r2,double eps);
++ IMETHOD friend bool Equal(const FrameAcc& r1,const Frame& r2,double eps);
+
+ IMETHOD TwistAcc Inverse(const TwistAcc& arg) const;
+ IMETHOD TwistAcc Inverse(const Twist& arg) const;
+@@ -227,9 +227,9 @@ public:
+ // the new point.
+ // Complexity : 6M+6A
+
+- IMETHOD friend bool Equal(const TwistAcc& a,const TwistAcc& b,double eps=epsilon);
+- IMETHOD friend bool Equal(const Twist& a,const TwistAcc& b,double eps=epsilon);
+- IMETHOD friend bool Equal(const TwistAcc& a,const Twist& b,double eps=epsilon);
++ IMETHOD friend bool Equal(const TwistAcc& a,const TwistAcc& b,double eps);
++ IMETHOD friend bool Equal(const Twist& a,const TwistAcc& b,double eps);
++ IMETHOD friend bool Equal(const TwistAcc& a,const Twist& b,double eps);
+
+
+ IMETHOD Twist GetTwist() const;
+--- freecad-0.14.3702+dfsg.orig/src/Mod/Robot/App/kdl_cp/frames.cpp
++++ freecad-0.14.3702+dfsg/src/Mod/Robot/App/kdl_cp/frames.cpp
+@@ -377,7 +377,7 @@ double Rotation::GetRotAngle(Vector& axi
+
+ bool operator==(const Rotation& a,const Rotation& b) {
+ #ifdef KDL_USE_EQUAL
+- return Equal(a,b);
++ return Equal(a,b, epsilon);
+ #else
+ return ( a.data[0]==b.data[0] &&
+ a.data[1]==b.data[1] &&
+--- freecad-0.14.3702+dfsg.orig/src/Mod/Robot/App/kdl_cp/frames.hpp
++++ freecad-0.14.3702+dfsg/src/Mod/Robot/App/kdl_cp/frames.hpp
+@@ -244,7 +244,7 @@ public:
+
+ //! do not use operator == because the definition of Equal(.,.) is slightly
+ //! different. It compares whether the 2 arguments are equal in an eps-interval
+- inline friend bool Equal(const Vector& a,const Vector& b,double eps=epsilon);
++ inline friend bool Equal(const Vector& a,const Vector& b,double eps);
+
+ //! The literal equality operator==(), also identical.
+ inline friend bool operator==(const Vector& a,const Vector& b);
+@@ -493,7 +493,7 @@ public:
+
+ //! do not use operator == because the definition of Equal(.,.) is slightly
+ //! different. It compares whether the 2 arguments are equal in an eps-interval
+- friend bool Equal(const Rotation& a,const Rotation& b,double eps=epsilon);
++ friend bool Equal(const Rotation& a,const Rotation& b,double eps);
+
+ //! The literal equality operator==(), also identical.
+ friend bool operator==(const Rotation& a,const Rotation& b);
+@@ -651,7 +651,7 @@ public:
+
+ //! do not use operator == because the definition of Equal(.,.) is slightly
+ //! different. It compares whether the 2 arguments are equal in an eps-interval
+- inline friend bool Equal(const Frame& a,const Frame& b,double eps=epsilon);
++ inline friend bool Equal(const Frame& a,const Frame& b,double eps);
+
+ //! The literal equality operator==(), also identical.
+ inline friend bool operator==(const Frame& a,const Frame& b);
+@@ -726,7 +726,7 @@ public:
+
+ //! do not use operator == because the definition of Equal(.,.) is slightly
+ //! different. It compares whether the 2 arguments are equal in an eps-interval
+- inline friend bool Equal(const Twist& a,const Twist& b,double eps=epsilon);
++ inline friend bool Equal(const Twist& a,const Twist& b,double eps);
+
+ //! The literal equality operator==(), also identical.
+ inline friend bool operator==(const Twist& a,const Twist& b);
+@@ -889,7 +889,7 @@ public:
+
+ //! do not use operator == because the definition of Equal(.,.) is slightly
+ //! different. It compares whether the 2 arguments are equal in an eps-interval
+- inline friend bool Equal(const Wrench& a,const Wrench& b,double eps=epsilon);
++ inline friend bool Equal(const Wrench& a,const Wrench& b,double eps);
+
+ //! The literal equality operator==(), also identical.
+ inline friend bool operator==(const Wrench& a,const Wrench& b);
+@@ -982,7 +982,7 @@ public:
+
+ //! do not use operator == because the definition of Equal(.,.) is slightly
+ //! different. It compares whether the 2 arguments are equal in an eps-interval
+- inline friend bool Equal(const Vector2& a,const Vector2& b,double eps=epsilon);
++ inline friend bool Equal(const Vector2& a,const Vector2& b,double eps);
+
+ //! The literal equality operator==(), also identical.
+ inline friend bool operator==(const Vector2& a,const Vector2& b);
+@@ -1034,7 +1034,7 @@ public:
+
+ //! do not use operator == because the definition of Equal(.,.) is slightly
+ //! different. It compares whether the 2 arguments are equal in an eps-interval
+- inline friend bool Equal(const Rotation2& a,const Rotation2& b,double eps=epsilon);
++ inline friend bool Equal(const Rotation2& a,const Rotation2& b,double eps);
+ };
+
+ //! A 2D frame class, for further documentation see the Frames class
+@@ -1075,7 +1075,7 @@ public:
+ tmp.SetIdentity();
+ return tmp;
+ }
+- inline friend bool Equal(const Frame2& a,const Frame2& b,double eps=epsilon);
++ inline friend bool Equal(const Frame2& a,const Frame2& b,double eps);
+ };
+
+ IMETHOD Vector diff(const Vector& a,const Vector& b,double dt=1);
+--- freecad-0.14.3702+dfsg.orig/src/Mod/Robot/App/kdl_cp/frames.inl
++++ freecad-0.14.3702+dfsg/src/Mod/Robot/App/kdl_cp/frames.inl
+@@ -1294,7 +1294,7 @@ IMETHOD void posrandom(Frame& F) {
+
+ IMETHOD bool operator==(const Frame& a,const Frame& b ) {
+ #ifdef KDL_USE_EQUAL
+- return Equal(a,b);
++ return Equal(a,b, epsilon);
+ #else
+ return (a.p == b.p &&
+ a.M == b.M );
+@@ -1307,7 +1307,7 @@ IMETHOD bool operator!=(const Frame& a,c
+
+ IMETHOD bool operator==(const Vector& a,const Vector& b) {
+ #ifdef KDL_USE_EQUAL
+- return Equal(a,b);
++ return Equal(a,b, epsilon);
+ #else
+ return (a.data[0]==b.data[0]&&
+ a.data[1]==b.data[1]&&
+@@ -1321,7 +1321,7 @@ IMETHOD bool operator!=(const Vector& a,
+
+ IMETHOD bool operator==(const Twist& a,const Twist& b) {
+ #ifdef KDL_USE_EQUAL
+- return Equal(a,b);
++ return Equal(a,b, epsilon);
+ #else
+ return (a.rot==b.rot &&
+ a.vel==b.vel );
+@@ -1334,7 +1334,7 @@ IMETHOD bool operator!=(const Twist& a,c
+
+ IMETHOD bool operator==(const Wrench& a,const Wrench& b ) {
+ #ifdef KDL_USE_EQUAL
+- return Equal(a,b);
++ return Equal(a,b, epsilon);
+ #else
+ return (a.force==b.force &&
+ a.torque==b.torque );
+@@ -1350,7 +1350,7 @@ IMETHOD bool operator!=(const Rotation&
+
+ IMETHOD bool operator==(const Vector2& a,const Vector2& b) {
+ #ifdef KDL_USE_EQUAL
+- return Equal(a,b);
++ return Equal(a,b, epsilon);
+ #else
+ return (a.data[0]==b.data[0]&&
+ a.data[1]==b.data[1] );
+--- freecad-0.14.3702+dfsg.orig/src/Mod/Robot/App/kdl_cp/framevel.hpp
++++ freecad-0.14.3702+dfsg/src/Mod/Robot/App/kdl_cp/framevel.hpp
+@@ -111,9 +111,9 @@ public:
+ IMETHOD friend void SetToZero(VectorVel& v);
+
+
+- IMETHOD friend bool Equal(const VectorVel& r1,const VectorVel& r2,double eps=epsilon);
+- IMETHOD friend bool Equal(const Vector& r1,const VectorVel& r2,double eps=epsilon);
+- IMETHOD friend bool Equal(const VectorVel& r1,const Vector& r2,double eps=epsilon);
++ IMETHOD friend bool Equal(const VectorVel& r1,const VectorVel& r2,double eps);
++ IMETHOD friend bool Equal(const Vector& r1,const VectorVel& r2,double eps);
++ IMETHOD friend bool Equal(const VectorVel& r1,const Vector& r2,double eps);
+ IMETHOD friend VectorVel operator - (const VectorVel& r);
+ IMETHOD friend doubleVel dot(const VectorVel& lhs,const VectorVel& rhs);
+ IMETHOD friend doubleVel dot(const VectorVel& lhs,const Vector& rhs);
+@@ -167,9 +167,9 @@ public:
+ IMETHOD friend RotationVel operator* (const RotationVel& r1,const RotationVel& r2);
+ IMETHOD friend RotationVel operator* (const Rotation& r1,const RotationVel& r2);
+ IMETHOD friend RotationVel operator* (const RotationVel& r1,const Rotation& r2);
+- IMETHOD friend bool Equal(const RotationVel& r1,const RotationVel& r2,double eps=epsilon);
+- IMETHOD friend bool Equal(const Rotation& r1,const RotationVel& r2,double eps=epsilon);
+- IMETHOD friend bool Equal(const RotationVel& r1,const Rotation& r2,double eps=epsilon);
++ IMETHOD friend bool Equal(const RotationVel& r1,const RotationVel& r2,double eps);
++ IMETHOD friend bool Equal(const Rotation& r1,const RotationVel& r2,double eps);
++ IMETHOD friend bool Equal(const RotationVel& r1,const Rotation& r2,double eps);
+
+ IMETHOD TwistVel Inverse(const TwistVel& arg) const;
+ IMETHOD TwistVel Inverse(const Twist& arg) const;
+@@ -221,9 +221,9 @@ public:
+ IMETHOD friend FrameVel operator * (const FrameVel& f1,const FrameVel& f2);
+ IMETHOD friend FrameVel operator * (const Frame& f1,const FrameVel& f2);
+ IMETHOD friend FrameVel operator * (const FrameVel& f1,const Frame& f2);
+- IMETHOD friend bool Equal(const FrameVel& r1,const FrameVel& r2,double eps=epsilon);
+- IMETHOD friend bool Equal(const Frame& r1,const FrameVel& r2,double eps=epsilon);
+- IMETHOD friend bool Equal(const FrameVel& r1,const Frame& r2,double eps=epsilon);
++ IMETHOD friend bool Equal(const FrameVel& r1,const FrameVel& r2,double eps);
++ IMETHOD friend bool Equal(const Frame& r1,const FrameVel& r2,double eps);
++ IMETHOD friend bool Equal(const FrameVel& r1,const Frame& r2,double eps);
+
+ IMETHOD TwistVel Inverse(const TwistVel& arg) const;
+ IMETHOD TwistVel Inverse(const Twist& arg) const;
+@@ -293,9 +293,9 @@ public:
+ // = Equality operators
+ // do not use operator == because the definition of Equal(.,.) is slightly
+ // different. It compares whether the 2 arguments are equal in an eps-interval
+- IMETHOD friend bool Equal(const TwistVel& a,const TwistVel& b,double eps=epsilon);
+- IMETHOD friend bool Equal(const Twist& a,const TwistVel& b,double eps=epsilon);
+- IMETHOD friend bool Equal(const TwistVel& a,const Twist& b,double eps=epsilon);
++ IMETHOD friend bool Equal(const TwistVel& a,const TwistVel& b,double eps);
++ IMETHOD friend bool Equal(const Twist& a,const TwistVel& b,double eps);
++ IMETHOD friend bool Equal(const TwistVel& a,const Twist& b,double eps);
+
+ // = Conversion to other entities
+ IMETHOD Twist GetTwist() const;
+--- freecad-0.14.3702+dfsg.orig/src/Mod/Robot/App/kdl_cp/jacobian.cpp
++++ freecad-0.14.3702+dfsg/src/Mod/Robot/App/kdl_cp/jacobian.cpp
+@@ -126,12 +126,12 @@ namespace KDL
+
+ bool Jacobian::operator ==(const Jacobian& arg)const
+ {
+- return Equal((*this),arg);
++ return Equal((*this),arg, epsilon);
+ }
+
+ bool Jacobian::operator!=(const Jacobian& arg)const
+ {
+- return !Equal((*this),arg);
++ return !Equal((*this),arg, epsilon);
+ }
+
+ bool Equal(const Jacobian& a,const Jacobian& b,double eps)
+--- freecad-0.14.3702+dfsg.orig/src/Mod/Robot/App/kdl_cp/jacobian.hpp
++++ freecad-0.14.3702+dfsg/src/Mod/Robot/App/kdl_cp/jacobian.hpp
+@@ -44,7 +44,7 @@ namespace KDL
+ bool operator ==(const Jacobian& arg)const;
+ bool operator !=(const Jacobian& arg)const;
+
+- friend bool Equal(const Jacobian& a,const Jacobian& b,double eps=epsilon);
++ friend bool Equal(const Jacobian& a,const Jacobian& b,double eps);
+
+
+ ~Jacobian();
+--- freecad-0.14.3702+dfsg.orig/src/Mod/Robot/App/kdl_cp/jntarrayacc.hpp
++++ freecad-0.14.3702+dfsg/src/Mod/Robot/App/kdl_cp/jntarrayacc.hpp
+@@ -61,7 +61,7 @@ namespace KDL
+ friend void Divide(const JntArrayAcc& src,const doubleVel& factor,JntArrayAcc& dest);
+ friend void Divide(const JntArrayAcc& src,const doubleAcc& factor,JntArrayAcc& dest);
+ friend void SetToZero(JntArrayAcc& array);
+- friend bool Equal(const JntArrayAcc& src1,const JntArrayAcc& src2,double eps=epsilon);
++ friend bool Equal(const JntArrayAcc& src1,const JntArrayAcc& src2,double eps);
+
+ };
+ }
+--- freecad-0.14.3702+dfsg.orig/src/Mod/Robot/App/kdl_cp/jntarrayvel.hpp
++++ freecad-0.14.3702+dfsg/src/Mod/Robot/App/kdl_cp/jntarrayvel.hpp
+@@ -54,7 +54,7 @@ namespace KDL
+ friend void Divide(const JntArrayVel& src,const double& factor,JntArrayVel& dest);
+ friend void Divide(const JntArrayVel& src,const doubleVel& factor,JntArrayVel& dest);
+ friend void SetToZero(JntArrayVel& array);
+- friend bool Equal(const JntArrayVel& src1,const JntArrayVel& src2,double eps=epsilon);
++ friend bool Equal(const JntArrayVel& src1,const JntArrayVel& src2,double eps);
+
+ };
+ }
+--- freecad-0.14.3702+dfsg.orig/src/Mod/Robot/App/kdl_cp/jntspaceinertiamatrix.cpp
++++ freecad-0.14.3702+dfsg/src/Mod/Robot/App/kdl_cp/jntspaceinertiamatrix.cpp
+@@ -115,7 +115,7 @@ namespace KDL
+ return src1.data.isApprox(src2.data,eps);
+ }
+
+- bool operator==(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2){return Equal(src1,src2);};
++ bool operator==(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2){return Equal(src1,src2, epsilon);};
+ //bool operator!=(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2){return Equal(src1,src2);};
+
+ }
+--- freecad-0.14.3702+dfsg.orig/src/Mod/Robot/App/kdl_cp/jntspaceinertiamatrix.hpp
++++ freecad-0.14.3702+dfsg/src/Mod/Robot/App/kdl_cp/jntspaceinertiamatrix.hpp
+@@ -203,7 +203,7 @@ class MyTask : public RTT::TaskContext
+ * @return true if each element of src1 is within eps of the same
+ * element in src2, or if both src1 and src2 have no data (ie 0==rows())
+ */
+- friend bool Equal(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2,double eps=epsilon);
++ friend bool Equal(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2,double eps);
+
+ friend bool operator==(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2);
+ //friend bool operator!=(const JntSpaceInertiaMatrix& src1,const JntSpaceInertiaMatrix& src2);
diff --git a/debian/patches/series b/debian/patches/series
index 4152c5c..7ca8835 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@ do_not_install_binary_examples.patch
exclude_ply.patch
disable_memory_check.patch
unittest_to_stdout.patch
+fix_clang_compilation.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/freecad.git
More information about the debian-science-commits
mailing list