diff --git a/cpp/Cal3_S2.h b/cpp/Cal3_S2.h index 54aa51ab0..10722c7b7 100644 --- a/cpp/Cal3_S2.h +++ b/cpp/Cal3_S2.h @@ -122,6 +122,8 @@ namespace gtsam { } }; + typedef boost::shared_ptr shared_ptrK; + /** * convert intrinsic coordinates xy to image coordinates uv */ diff --git a/cpp/VSLAMFactor.h b/cpp/VSLAMFactor.h index 604159ffc..f6f7ea034 100644 --- a/cpp/VSLAMFactor.h +++ b/cpp/VSLAMFactor.h @@ -31,7 +31,6 @@ private: public: typedef boost::shared_ptr shared_ptr; // shorthand for a smart pointer to a factor - typedef boost::shared_ptr shared_ptrK; /** * Default constructor diff --git a/cpp/testVSLAMFactor.cpp b/cpp/testVSLAMFactor.cpp index c8ae05e5a..8faa80aa1 100644 --- a/cpp/testVSLAMFactor.cpp +++ b/cpp/testVSLAMFactor.cpp @@ -32,7 +32,7 @@ TEST( VSLAMFactor, error ) double sigma=1.0; int cameraFrameNumber=1, landmarkNumber=1; boost::shared_ptr - factor(new VSLAMFactor(z, sigma, cameraFrameNumber, landmarkNumber, VSLAMFactor::shared_ptrK(new Cal3_S2(K)))); + factor(new VSLAMFactor(z, sigma, cameraFrameNumber, landmarkNumber, shared_ptrK(new Cal3_S2(K)))); // For the following configuration, the factor predicts 320,240 VSLAMConfig config; @@ -77,10 +77,10 @@ TEST( VSLAMFactor, equals ) double sigma=1.0; int cameraFrameNumber=1, landmarkNumber=1; boost::shared_ptr - factor1(new VSLAMFactor(z, sigma, cameraFrameNumber, landmarkNumber, VSLAMFactor::shared_ptrK(new Cal3_S2(K)))); + factor1(new VSLAMFactor(z, sigma, cameraFrameNumber, landmarkNumber, shared_ptrK(new Cal3_S2(K)))); boost::shared_ptr - factor2(new VSLAMFactor(z, sigma, cameraFrameNumber, landmarkNumber, VSLAMFactor::shared_ptrK(new Cal3_S2(K)))); + factor2(new VSLAMFactor(z, sigma, cameraFrameNumber, landmarkNumber, shared_ptrK(new Cal3_S2(K)))); CHECK(assert_equal(*factor1, *factor2)); } diff --git a/cpp/testVSLAMGraph.cpp b/cpp/testVSLAMGraph.cpp index 3337898cd..0d5ac4517 100644 --- a/cpp/testVSLAMGraph.cpp +++ b/cpp/testVSLAMGraph.cpp @@ -49,7 +49,7 @@ VSLAMGraph testGraph() { Point2 z24( 125, 125); double sigma = 1; - VSLAMFactor::shared_ptrK sK(new Cal3_S2(625, 625, 0, 0, 0)); + shared_ptrK sK(new Cal3_S2(625, 625, 0, 0, 0)); VSLAMGraph g; g.push_back(VSLAMFactor::shared_ptr(new VSLAMFactor(z11, sigma, 1, 1, sK))); g.push_back(VSLAMFactor::shared_ptr(new VSLAMFactor(z12, sigma, 1, 2, sK)));