From ff05eee0ca8062221c88ab01b42154ff2a89ba86 Mon Sep 17 00:00:00 2001 From: Nghia Ho Date: Thu, 13 Dec 2018 17:03:31 -0800 Subject: [PATCH] fix for valgrind invalid read warning --- gtsam/nonlinear/ISAM2Clique.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtsam/nonlinear/ISAM2Clique.cpp b/gtsam/nonlinear/ISAM2Clique.cpp index c55ca7959..48295f338 100644 --- a/gtsam/nonlinear/ISAM2Clique.cpp +++ b/gtsam/nonlinear/ISAM2Clique.cpp @@ -172,7 +172,7 @@ bool ISAM2Clique::valuesChanged(const KeySet& replaced, double threshold) const { auto frontals = conditional_->frontals(); if (replaced.exists(frontals.front())) return true; - auto diff = originalValues - delta.vector(frontals); + Vector diff = originalValues - delta.vector(frontals); return diff.lpNorm() >= threshold; }