diff --git a/gtsam/nonlinear/ExpressionFactor.h b/gtsam/nonlinear/ExpressionFactor.h index 269bdf924..b3e34d079 100644 --- a/gtsam/nonlinear/ExpressionFactor.h +++ b/gtsam/nonlinear/ExpressionFactor.h @@ -24,7 +24,9 @@ #include #include #include + #include +#include namespace gtsam { @@ -147,7 +149,7 @@ protected: noiseModel_->WhitenSystem(Ab.matrix(), b); } - return factor; + return std::move(factor); } /// @return a deep copy of this factor @@ -252,9 +254,6 @@ public: // Provide access to the Matrix& version of unwhitenedError: using ExpressionFactor::unwhitenedError; - /// Destructor - ~ExpressionFactorN() override = default; - // Don't provide backward compatible evaluateVector(), due to its problematic // variable length of optional Jacobian arguments. Vector evaluateError(const // Args... args,...);