From 25c82c98784c5654ab437c2a0831f4227f9090d0 Mon Sep 17 00:00:00 2001 From: David Wisth Date: Mon, 3 Jan 2022 16:41:21 +1100 Subject: [PATCH] change a couple of variables to const --- gtsam_unstable/slam/ProjectionFactorPPPC.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtsam_unstable/slam/ProjectionFactorPPPC.h b/gtsam_unstable/slam/ProjectionFactorPPPC.h index 35940b201..18ee13b9a 100644 --- a/gtsam_unstable/slam/ProjectionFactorPPPC.h +++ b/gtsam_unstable/slam/ProjectionFactorPPPC.h @@ -115,8 +115,8 @@ class GTSAM_UNSTABLE_EXPORT ProjectionFactorPPPC try { if(H1 || H2 || H3 || H4) { Matrix H0, H02; - PinholeCamera camera(pose.compose(transform, H0, H02), K); - Point2 reprojectionError(camera.project(point, H1, H3, H4) - measured_); + const PinholeCamera camera(pose.compose(transform, H0, H02), K); + const Point2 reprojectionError(camera.project(point, H1, H3, H4) - measured_); *H2 = *H1 * H02; *H1 = *H1 * H0; return reprojectionError;