Lint and other fixes from William Rucklidge
Change-Id: Ic18561a5cdadccc75e97818fa4422bb5d9d43df9
diff --git a/include/ceres/iteration_callback.h b/include/ceres/iteration_callback.h
index 0dc4c96..13140c2 100644
--- a/include/ceres/iteration_callback.h
+++ b/include/ceres/iteration_callback.h
@@ -128,6 +128,8 @@
// Newton step.
int linear_solver_iterations;
+ // All times reported below are wall times.
+
// Time (in seconds) spent inside the minimizer loop in the current
// iteration.
double iteration_time_in_seconds;
diff --git a/include/ceres/jet.h b/include/ceres/jet.h
index 7299a48..4d2a857 100644
--- a/include/ceres/jet.h
+++ b/include/ceres/jet.h
@@ -545,8 +545,8 @@
Jet<T, N> tanh(const Jet<T, N>& f) {
Jet<T, N> g;
g.a = tanh(f.a);
- double tanh_fa = tanh(f.a);
- const T tmp = 1 - tanh_fa * tanh_fa;
+ double tanh_a = tanh(f.a);
+ const T tmp = T(1.0) - tanh_a * tanh_a;
g.v = tmp * f.v;
return g;
}
diff --git a/include/ceres/solver.h b/include/ceres/solver.h
index 854df2a..8bf87f9 100644
--- a/include/ceres/solver.h
+++ b/include/ceres/solver.h
@@ -603,6 +603,8 @@
int num_unsuccessful_steps;
int num_inner_iteration_steps;
+ // All times reported below are wall times.
+
// When the user calls Solve, before the actual optimization
// occurs, Ceres performs a number of preprocessing steps. These
// include error checks, memory allocations, and reorderings. This