Lint changes from William Rucklidge.
Change-Id: I5a9683333fbab189058076cb2053f8f7afc7096a
diff --git a/examples/bundle_adjuster.cc b/examples/bundle_adjuster.cc
index e64fdb5..696aa58 100644
--- a/examples/bundle_adjuster.cc
+++ b/examples/bundle_adjuster.cc
@@ -122,7 +122,7 @@
"algorithm.");
DEFINE_string(initial_ply, "", "Export the BAL file data as a PLY file.");
DEFINE_string(final_ply, "", "Export the refined BAL file data as a PLY "
- "file.");
+ "file.");
namespace ceres {
namespace examples {
diff --git a/include/ceres/jet.h b/include/ceres/jet.h
index 87197ad..1704c49 100644
--- a/include/ceres/jet.h
+++ b/include/ceres/jet.h
@@ -616,7 +616,7 @@
if (g.a > 1) {
return Jet<T, N>(T(0.0));
}
- return Jet<T, N>(T(0.0), f.v);
+ return f;
}
// Handle the generic case for f != 0. We also handle f == 0, g < 1 here and
// allow the log() function to generate -HUGE_VAL, since this results in a
diff --git a/internal/ceres/jet_test.cc b/internal/ceres/jet_test.cc
index 394dbb8..589fa56 100644
--- a/internal/ceres/jet_test.cc
+++ b/internal/ceres/jet_test.cc
@@ -244,7 +244,7 @@
ExpectJetsClose(v, u);
}
- { // Check that pow(0,y) == 1 for y>1, with both arguments Jets.
+ { // Check that pow(0, y) == 0 for y > 1, with both arguments Jets.
// This tests special case handling inside pow().
J a = MakeJet(0, 1, 2);
J b = MakeJet(2, 3, 4);
@@ -256,7 +256,7 @@
ExpectJetsClose(c, MakeJet(0, 0, 0));
}
- { // Check that pow(0,y) == 1 for y==1, with both arguments Jets.
+ { // Check that pow(0, y) == 0 for y == 1, with both arguments Jets.
// This tests special case handling inside pow().
J a = MakeJet(0, 1, 2);
J b = MakeJet(1, 3, 4);
@@ -268,10 +268,10 @@
ExpectJetsClose(c, MakeJet(0, 1, 2));
}
- { // Check that pow(0,<1) is not finite, with both arguments Jets.
+ { // Check that pow(0, <1) is not finite, with both arguments Jets.
for (int i = 1; i < 10; i++) {
J a = MakeJet(0, 1, 2);
- J b = MakeJet(i*0.1, 3, 4); // b=0.1 ... 0.9
+ J b = MakeJet(i*0.1, 3, 4); // b = 0.1 ... 0.9
VL << "a = " << a;
VL << "b = " << b;
@@ -283,7 +283,7 @@
}
for (int i = -10; i < 0; i++) {
J a = MakeJet(0, 1, 2);
- J b = MakeJet(i*0.1, 3, 4); // b=-1,-0.9 ... 0
+ J b = MakeJet(i*0.1, 3, 4); // b = -0.1,-0.9 ... 0
VL << "a = " << a;
VL << "b = " << b;
@@ -293,8 +293,9 @@
EXPECT_FALSE(IsFinite(c.v[0]));
EXPECT_FALSE(IsFinite(c.v[1]));
}
+
{
- // The special case of 0^0=1 defined by the C standard.
+ // The special case of 0^0 = 1 defined by the C standard.
J a = MakeJet(0, 1, 2);
J b = MakeJet(0, 3, 4);
VL << "a = " << a;
@@ -308,8 +309,9 @@
}
}
- { // Check that pow(0,y) == 1 for y==2, with the second argument a Jets.
- // This tests special case handling inside pow().
+ {
+ // Check that pow(0,y) == 0 for y == 2, with the second argument a
+ // Jet. This tests special case handling inside pow().
double a = 0;
J b = MakeJet(2, 3, 4);
VL << "a = " << a;