Browse Source

Remove the trivial operator= implementations, the default shallow copy is fine.

git-svn-id: https://arducopter.googlecode.com/svn/trunk@537 f9c3cf11-9bcb-44bc-f272-b75c42450872
mission-4.1.18
DrZiplok@gmail.com 15 years ago
parent
commit
815e5f871a
  1. 7
      libraries/AP_Math/matrix3.h
  2. 7
      libraries/AP_Math/vector2.h
  3. 7
      libraries/AP_Math/vector3.h

7
libraries/AP_Math/matrix3.h

@ -59,13 +59,6 @@ public: @@ -59,13 +59,6 @@ public:
bool operator != (const Matrix3<T> &m)
{ return (a!=m.a || b!=m.b || c!=m.c); }
// set to value
Matrix3<T> &operator = (const Matrix3<T> &m)
{
a= m.a; b= m.b; c= m.c;
return *this;
}
// negation
const Matrix3<T> operator - (void) const
{ return Matrix3<T>(-a,-b,-c); }

7
libraries/AP_Math/vector2.h

@ -57,13 +57,6 @@ struct Vector2 @@ -57,13 +57,6 @@ struct Vector2
bool operator!=(const Vector2<T> &v)
{ return (x!=v.x || y!=v.y); }
// set to value
Vector2<T> &operator =(const Vector2<T> &v)
{
x= v.x; y= v.y;
return *this;
}
// negation
const Vector2<T> operator -(void) const
{ return Vector2<T>(-x, -y); }

7
libraries/AP_Math/vector3.h

@ -67,13 +67,6 @@ public: @@ -67,13 +67,6 @@ public:
bool operator!=(const Vector3<T> &v)
{ return (x!=v.x || y!=v.y || z!=v.z); }
// set to value
Vector3<T> &operator =(const Vector3<T> &v)
{
x= v.x; y= v.y; z= v.z;
return *this;
}
// negation
const Vector3<T> operator -(void) const
{ return Vector3<T>(-x,-y,-z); }

Loading…
Cancel
Save