From e8e4bea84c03f87c0c63c7d04e53f6bc329301ff Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Mon, 20 Dec 2021 17:57:24 -0500 Subject: [PATCH] add alignment macro and modernize typedefs --- gtsam/slam/TriangulationFactor.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gtsam/slam/TriangulationFactor.h b/gtsam/slam/TriangulationFactor.h index 0a15d6861..40e9538e2 100644 --- a/gtsam/slam/TriangulationFactor.h +++ b/gtsam/slam/TriangulationFactor.h @@ -33,18 +33,18 @@ class TriangulationFactor: public NoiseModelFactor1 { public: /// CAMERA type - typedef CAMERA Camera; + using Camera = CAMERA; protected: /// shorthand for base class type - typedef NoiseModelFactor1 Base; + using Base = NoiseModelFactor1; /// shorthand for this class - typedef TriangulationFactor This; + using This = TriangulationFactor; /// shorthand for measurement type, e.g. Point2 or StereoPoint2 - typedef typename CAMERA::Measurement Measurement; + using Measurement = typename CAMERA::Measurement; // Keep a copy of measurement and calibration for I/O const CAMERA camera_; ///< CAMERA in which this landmark was seen @@ -55,9 +55,10 @@ protected: const bool verboseCheirality_; ///< If true, prints text for Cheirality exceptions (default: false) public: + EIGEN_MAKE_ALIGNED_OPERATOR_NEW /// shorthand for a smart pointer to a factor - typedef boost::shared_ptr shared_ptr; + using shared_ptr = boost::shared_ptr; /// Default constructor TriangulationFactor() :