1. Eric Cousineau
  2. rbdl

Commits

Martin Felis  committed a389f80

fixed initialization orders in constructors

  • Participants
  • Parent commits 3145f16
  • Branches default

Comments (0)

Files changed (2)

File src/Body.h

View file
 			const Math::Vector3d &com,
 			const Math::Matrix3d &inertia_C) :
 		mMass (mass),
-		mInertia (inertia_C),
-		mCenterOfMass(com) {
+		mCenterOfMass(com),
+		mInertia (inertia_C) {
 			Math::Matrix3d com_cross (
 					0., -com[2],  com[1],
 					com[2],      0., -com[0],

File src/SpatialAlgebraOperators.h

View file
 		return result;
 	}
 
+	double m;
 	Vector3d h;
 	Matrix3d I;
-	double m;
 };
 
 /** \brief Compact representation of spatial transformations.