Skip to content
Snippets Groups Projects
Verified Commit 81f44f4a authored by Justin Carpentier's avatar Justin Carpentier
Browse files

spatial/Force: remove __equal__ method and use operator= instead

parent 3c24f145
No related merge requests found
......@@ -127,7 +127,8 @@ namespace se3
/** \brief Copies the Derived Force into *this
* \return a reference to *this
*/
Derived & operator= (const ForceBase<Derived> & other) { return derived().__equl__(other.derived()); }
Derived & operator=(const ForceBase<Derived> & other)
{ return derived().setFrom(other.derived()); }
/**
* \brief Replaces *this by *this + other.
......
......@@ -63,13 +63,19 @@ namespace se3
// Arithmetic operators
template<typename D2>
Derived & __equl__(const ForceDense<D2> & other)
Derived & setFrom(const ForceDense<D2> & other)
{
linear() = other.linear();
angular() = other.angular();
return derived();
}
template<typename D2>
Derived & operator=(const ForceDense<D2> & other)
{
return derived().setFrom(other.derived());
}
template<typename V6>
Derived & operator=(const Eigen::MatrixBase<V6> & v)
{
......@@ -79,12 +85,6 @@ namespace se3
return derived();
}
template<typename D2>
Derived & operator=(const ForceDense<D2> & other)
{
return derived().__equl__(other.derived());
}
ForcePlain operator-() const { return derived().__opposite__(); }
template<typename F1>
ForcePlain operator+(const ForceDense<F1> & f) const { return derived().__plus__(f.derived()); }
......
......@@ -85,13 +85,6 @@ namespace se3
explicit ForceTpl(const ForceDense<M2> & clone)
{ linear() = clone.linear(); angular() = clone.angular(); }
template<int O2>
ForceTpl & __equl__(const ForceTpl<Scalar,O2> & other)
{
m_data = other.toVector();
return *this;
}
// initializers
static ForceTpl Zero() { return ForceTpl(Vector6::Zero()); }
static ForceTpl Random() { return ForceTpl(Vector6::Random()); }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment