From 6c198809af442393a2c46aff1b6303a5c294dcc3 Mon Sep 17 00:00:00 2001 From: Kai Ni Date: Fri, 19 Mar 2010 20:32:19 +0000 Subject: [PATCH] fixed the warnings caused by the initialization order --- cpp/Pose2.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cpp/Pose2.h b/cpp/Pose2.h index 85f4f1c50..05b015a94 100644 --- a/cpp/Pose2.h +++ b/cpp/Pose2.h @@ -23,8 +23,8 @@ namespace gtsam { */ class Pose2: Testable, public Lie { private: - Point2 t_; Rot2 r_; + Point2 t_; public: @@ -32,7 +32,7 @@ namespace gtsam { Pose2() {} // default is origin /** 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) @@ -41,14 +41,14 @@ namespace gtsam { * @param theta angle with positive X-axis */ 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 */ 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 */ Pose2(const Matrix &T) :