commit | ae4d95df6ee1703b273b69a6314a8751acabe29b | [log] [tgz] |
---|---|---|
author | Sameer Agarwal <sameeragarwal@google.com> | Sun Feb 27 05:26:07 2022 -0800 |
committer | Sameer Agarwal <sameeragarwal@google.com> | Sun Feb 27 05:41:07 2022 -0800 |
tree | 88f705c28adb6b180616ed6cfd3885cd44a003ec | |
parent | f0851667bea45564fe1c2a5b8a4f27bcde112e85 [diff] |
Two small clang-tidy fixes Change-Id: I1eb3b5aabc9586958d618c680ca1a2c6ed501fd4
diff --git a/examples/slam/pose_graph_3d/types.h b/examples/slam/pose_graph_3d/types.h index 67b0715..4061728 100644 --- a/examples/slam/pose_graph_3d/types.h +++ b/examples/slam/pose_graph_3d/types.h
@@ -31,6 +31,7 @@ #ifndef EXAMPLES_CERES_TYPES_H_ #define EXAMPLES_CERES_TYPES_H_ +#include <functional> #include <istream> #include <map> #include <string>
diff --git a/internal/ceres/visibility.cc b/internal/ceres/visibility.cc index 0867733..f666ce0 100644 --- a/internal/ceres/visibility.cc +++ b/internal/ceres/visibility.cc
@@ -88,7 +88,7 @@ // visible to it, we find the maximum across all visibility sets. int num_points = 0; for (const auto& visible : visibility) { - if (visible.size() > 0) { + if (!visible.empty()) { num_points = max(num_points, (*visible.rbegin()) + 1); } }