Skip to content

Commit 7b4136d

Browse files
authored
Merge pull request #215 from ros2/ivanpauno/fix-build-warning-focal
Fix build warnings in gcc 9.2.1
2 parents 3053a12 + 13b1962 commit 7b4136d

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

orocos_kdl/src/frames.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,8 @@ class Rotation
310310
double Xy,double Yy,double Zy,
311311
double Xz,double Yz,double Zz);
312312
inline Rotation(const Vector& x,const Vector& y,const Vector& z);
313-
// default copy constructor is sufficient
314313

314+
inline Rotation(const Rotation& arg);
315315

316316
inline Rotation& operator=(const Rotation& arg);
317317

@@ -1060,6 +1060,8 @@ class Rotation2
10601060

10611061
Rotation2(double ca,double sa):s(sa),c(ca){}
10621062

1063+
Rotation2(const Rotation2& arg);
1064+
10631065
inline Rotation2& operator=(const Rotation2& arg);
10641066
inline Vector2 operator*(const Vector2& v) const;
10651067
//! Access to elements 0..1,0..1, bounds are checked when NDEBUG is not set

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)