From 0ed96dda33cb709dbed8a4cadbab025e0887476a Mon Sep 17 00:00:00 2001 From: dellaert Date: Mon, 6 Oct 2014 12:14:15 +0200 Subject: [PATCH] Avoid alloc and copy --- gtsam_unstable/nonlinear/Expression.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtsam_unstable/nonlinear/Expression.h b/gtsam_unstable/nonlinear/Expression.h index 76e71ccc7..18e6c35e1 100644 --- a/gtsam_unstable/nonlinear/Expression.h +++ b/gtsam_unstable/nonlinear/Expression.h @@ -113,7 +113,7 @@ public: Augmented augmented(const Values& values) const { #define REVERSE_AD #ifdef REVERSE_AD - boost::shared_ptr > trace = root_->traceExecution(values); + boost::shared_ptr > trace(root_->traceExecution(values)); Augmented augmented(trace->value()); trace->reverseAD(augmented.jacobians()); return augmented;