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); } }