Skip to content

Commit 13b1962

Browse files
committed
Make it work in c++03 too
Signed-off-by: Ivan Santiago Paunovic <[email protected]>
1 parent b70a0f9 commit 13b1962

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

orocos_kdl/src/frames.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,7 @@ class Rotation
311311
double Xz,double Yz,double Zz);
312312
inline Rotation(const Vector& x,const Vector& y,const Vector& z);
313313

314-
// default copy constructor is sufficient
315-
constexpr Rotation(const Rotation&) = default;
314+
inline Rotation(const Rotation& arg);
316315

317316
inline Rotation& operator=(const Rotation& arg);
318317

@@ -1061,8 +1060,7 @@ class Rotation2
10611060

10621061
Rotation2(double ca,double sa):s(sa),c(ca){}
10631062

1064-
// default copy constructor is sufficient
1065-
constexpr Rotation2(const Rotation2&) = default;
1063+
Rotation2(const Rotation2& arg);
10661064

10671065
inline Rotation2& operator=(const Rotation2& arg);
10681066
inline Vector2 operator*(const Vector2& v) const;

orocos_kdl/src/frames.inl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,11 @@ Rotation::Rotation(const Vector& x,const Vector& y,const Vector& z)
512512
data[2] = z.data[0];data[5] = z.data[1];data[8] = z.data[2];
513513
}
514514

515+
Rotation::Rotation(const Rotation& arg) {
516+
int count=9;
517+
while (count--) data[count] = arg.data[count];
518+
}
519+
515520
Rotation& Rotation::operator=(const Rotation& arg) {
516521
int count=9;
517522
while (count--) data[count] = arg.data[count];
@@ -839,7 +844,9 @@ IMETHOD void Vector2::Set3DPlane(const Frame& F_someframe_XY,const Vector& v_som
839844
data[1]=tmp(1);
840845
}
841846

842-
847+
IMETHOD Rotation2::Rotation2(const Rotation2& arg) {
848+
c=arg.c;s=arg.s;
849+
}
843850

844851
IMETHOD Rotation2& Rotation2::operator=(const Rotation2& arg) {
845852
c=arg.c;s=arg.s;

0 commit comments

Comments
 (0)