From bfd40014a277621fa267a9457618cb58ed6e2246 Mon Sep 17 00:00:00 2001 From: cbeall3 Date: Sun, 7 Dec 2014 12:38:36 -0500 Subject: [PATCH] comma initialization --- gtsam/geometry/Cal3_S2.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gtsam/geometry/Cal3_S2.h b/gtsam/geometry/Cal3_S2.h index cf358d0b2..e6b56eea0 100644 --- a/gtsam/geometry/Cal3_S2.h +++ b/gtsam/geometry/Cal3_S2.h @@ -117,10 +117,9 @@ public: } /// vectorized form (column-wise) - Vector vector() const { - double r[] = { fx_, fy_, s_, u0_, v0_ }; - Vector v(5); - std::copy(r, r + 5, v.data()); + Vector5 vector() const { + Vector5 v; + v << fx_, fy_, s_, u0_, v0_; return v; } @@ -199,7 +198,7 @@ public: } /// Unretraction for the calibration - Vector localCoordinates(const Cal3_S2& T2) const { + Vector5 localCoordinates(const Cal3_S2& T2) const { return T2.vector() - vector(); }