Zero-initialize Jet derivative components. Change-Id: I9606aadb1a1f275608f6f332858af9258a120b05
diff --git a/include/ceres/jet.h b/include/ceres/jet.h index 1266acf..96e2256 100644 --- a/include/ceres/jet.h +++ b/include/ceres/jet.h
@@ -175,7 +175,9 @@ // (where T is a Jet<T, N>). This usually only happens in opt mode. Note that // the C++ standard mandates that e.g. default constructed doubles are // initialized to 0.0; see sections 8.5 of the C++03 standard. - Jet() : a() {} + Jet() : a() { + v.setZero(); + } // Constructor from scalar: a + 0. explicit Jet(const T& value) {