PVS issues:
consistently define copy constructor and assignment operator remove superfluous casts initialize member variables in constructor avoid double assignment
This commit is contained in:
@@ -90,6 +90,19 @@ Rotation::Rotation(const Rotation& rot)
|
||||
this->_angle = rot._angle;
|
||||
}
|
||||
|
||||
void Rotation::operator = (const Rotation& rot)
|
||||
{
|
||||
this->quat[0] = rot.quat[0];
|
||||
this->quat[1] = rot.quat[1];
|
||||
this->quat[2] = rot.quat[2];
|
||||
this->quat[3] = rot.quat[3];
|
||||
|
||||
this->_axis[0] = rot._axis[0];
|
||||
this->_axis[1] = rot._axis[1];
|
||||
this->_axis[2] = rot._axis[2];
|
||||
this->_angle = rot._angle;
|
||||
}
|
||||
|
||||
const double * Rotation::getValue(void) const
|
||||
{
|
||||
return &this->quat[0];
|
||||
|
||||
Reference in New Issue
Block a user