From 1d8a4563c994505aa6105ade46400e140f0ef291 Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Sun, 30 Jan 2022 14:02:29 -0500 Subject: [PATCH] use const & --- gtsam/slam/dataset.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gtsam/slam/dataset.cpp b/gtsam/slam/dataset.cpp index 0684063de..fc020b05b 100644 --- a/gtsam/slam/dataset.cpp +++ b/gtsam/slam/dataset.cpp @@ -208,15 +208,15 @@ std::map parseVariables(const std::string &filename, /* ************************************************************************* */ // Interpret noise parameters according to flags -static SharedNoiseModel -createNoiseModel(const Vector6 v, bool smart, NoiseFormat noiseFormat, - KernelFunctionType kernelFunctionType) { +static SharedNoiseModel createNoiseModel( + const Vector6 &v, bool smart, NoiseFormat noiseFormat, + KernelFunctionType kernelFunctionType) { if (noiseFormat == NoiseFormatAUTO) { // Try to guess covariance matrix layout - if (v(0) != 0.0 && v(1) == 0.0 && v(2) != 0.0 && // + if (v(0) != 0.0 && v(1) == 0.0 && v(2) != 0.0 && // v(3) != 0.0 && v(4) == 0.0 && v(5) == 0.0) { noiseFormat = NoiseFormatGRAPH; - } else if (v(0) != 0.0 && v(1) == 0.0 && v(2) == 0.0 && // + } else if (v(0) != 0.0 && v(1) == 0.0 && v(2) == 0.0 && // v(3) != 0.0 && v(4) == 0.0 && v(5) != 0.0) { noiseFormat = NoiseFormatCOV; } else {