fixed the warnings caused by the initialization order

release/4.3a0
Kai Ni 2010-03-19 20:32:19 +00:00
parent 62d24a8d48
commit 6c198809af
1 changed files with 5 additions and 5 deletions

View File

@ -23,8 +23,8 @@ namespace gtsam {
*/ */
class Pose2: Testable<Pose2>, public Lie<Pose2> { class Pose2: Testable<Pose2>, public Lie<Pose2> {
private: private:
Point2 t_;
Rot2 r_; Rot2 r_;
Point2 t_;
public: public:
@ -32,7 +32,7 @@ namespace gtsam {
Pose2() {} // default is origin Pose2() {} // default is origin
/** copy constructor */ /** copy constructor */
Pose2(const Pose2& pose) : t_(pose.t_), r_(pose.r_) {} Pose2(const Pose2& pose) : r_(pose.r_), t_(pose.t_) {}
/** /**
* construct from (x,y,theta) * construct from (x,y,theta)
@ -41,14 +41,14 @@ namespace gtsam {
* @param theta angle with positive X-axis * @param theta angle with positive X-axis
*/ */
Pose2(double x, double y, double theta) : Pose2(double x, double y, double theta) :
t_(x, y), r_(Rot2::fromAngle(theta)) { r_(Rot2::fromAngle(theta)), t_(x, y) {
} }
/** construct from rotation and translation */ /** construct from rotation and translation */
Pose2(double theta, const Point2& t) : Pose2(double theta, const Point2& t) :
t_(t), r_(Rot2::fromAngle(theta)) { r_(Rot2::fromAngle(theta)), t_(t) {
} }
Pose2(const Rot2& r, const Point2& t) : t_(t), r_(r) {} Pose2(const Rot2& r, const Point2& t) : r_(r), t_(t) {}
/** Constructor from 3*3 matrix */ /** Constructor from 3*3 matrix */
Pose2(const Matrix &T) : Pose2(const Matrix &T) :