Nest some more namespaces
Did someone previously suggest that all namespace had been
nested? Silly.
Signed-off-by: Stephan Pleines <pleines.stephan@gmail.com>
Change-Id: I22278c1caaeba8b47dc46fb2ed3078c20a11e190
diff --git a/frc971/vision/calibration_accumulator.h b/frc971/vision/calibration_accumulator.h
index 9a6f483..550b691 100644
--- a/frc971/vision/calibration_accumulator.h
+++ b/frc971/vision/calibration_accumulator.h
@@ -12,8 +12,7 @@
#include "frc971/vision/foxglove_image_converter_lib.h"
#include "frc971/wpilib/imu_batch_generated.h"
-namespace frc971 {
-namespace vision {
+namespace frc971::vision {
// This class provides an interface for an application to be notified of all
// camera and IMU samples in order with the correct timestamps.
@@ -143,7 +142,6 @@
frc971::IMUValuesT last_value_;
};
-} // namespace vision
-} // namespace frc971
+} // namespace frc971::vision
#endif // FRC971_VISION_CALIBRATION_ACCUMULATOR_H_
diff --git a/frc971/vision/ceres/pose_graph_3d_error_term.h b/frc971/vision/ceres/pose_graph_3d_error_term.h
index 4dd5fbd..217b2a9 100644
--- a/frc971/vision/ceres/pose_graph_3d_error_term.h
+++ b/frc971/vision/ceres/pose_graph_3d_error_term.h
@@ -36,8 +36,7 @@
#include "types.h"
-namespace ceres {
-namespace examples {
+namespace ceres::examples {
// Computes the error term for two poses that have a relative pose measurement
// between them. Let the hat variables be the measurement. We have two poses x_a
@@ -133,7 +132,6 @@
const double weight_;
};
-} // namespace examples
-} // namespace ceres
+} // namespace ceres::examples
#endif // EXAMPLES_CERES_POSE_GRAPH_3D_ERROR_TERM_H_
diff --git a/frc971/vision/ceres/read_g2o.h b/frc971/vision/ceres/read_g2o.h
index 69fa16a..c427939 100644
--- a/frc971/vision/ceres/read_g2o.h
+++ b/frc971/vision/ceres/read_g2o.h
@@ -38,8 +38,7 @@
#include "glog/logging.h"
-namespace ceres {
-namespace examples {
+namespace ceres::examples {
// Reads a single pose from the input and inserts it into the map. Returns false
// if there is a duplicate entry.
@@ -136,7 +135,6 @@
return true;
}
-} // namespace examples
-} // namespace ceres
+} // namespace ceres::examples
#endif // EXAMPLES_CERES_READ_G2O_H_
diff --git a/frc971/vision/ceres/types.h b/frc971/vision/ceres/types.h
index 17e9bd3..9c1e495 100644
--- a/frc971/vision/ceres/types.h
+++ b/frc971/vision/ceres/types.h
@@ -39,8 +39,7 @@
#include "Eigen/Core"
#include "Eigen/Geometry"
-namespace ceres {
-namespace examples {
+namespace ceres::examples {
struct Pose3d {
Eigen::Vector3d p;
@@ -104,7 +103,6 @@
typedef std::vector<Constraint3d, Eigen::aligned_allocator<Constraint3d>>
VectorOfConstraints;
-} // namespace examples
-} // namespace ceres
+} // namespace ceres::examples
#endif // EXAMPLES_CERES_TYPES_H_
diff --git a/frc971/vision/charuco_lib.h b/frc971/vision/charuco_lib.h
index 62923db..aac25ee 100644
--- a/frc971/vision/charuco_lib.h
+++ b/frc971/vision/charuco_lib.h
@@ -17,8 +17,7 @@
DECLARE_bool(visualize);
-namespace frc971 {
-namespace vision {
+namespace frc971::vision {
// Class to find extrinsics for a specified pi's camera using the provided
// training data.
@@ -211,7 +210,6 @@
const foxglove::PointsAnnotationType line_type =
foxglove::PointsAnnotationType::POINTS);
-} // namespace vision
-} // namespace frc971
+} // namespace frc971::vision
#endif // Y2020_VISION_CHARUCO_LIB_H_
diff --git a/frc971/vision/extrinsics_calibration.h b/frc971/vision/extrinsics_calibration.h
index f6c3ccc..97d719f 100644
--- a/frc971/vision/extrinsics_calibration.h
+++ b/frc971/vision/extrinsics_calibration.h
@@ -6,8 +6,7 @@
#include "frc971/vision/calibration_accumulator.h"
-namespace frc971 {
-namespace vision {
+namespace frc971::vision {
struct CalibrationParameters {
Eigen::Quaternion<double> initial_orientation =
@@ -55,7 +54,6 @@
void Visualize(const CalibrationData &data,
const CalibrationParameters &calibration_parameters);
-} // namespace vision
-} // namespace frc971
+} // namespace frc971::vision
#endif // FRC971_VISION_EXTRINSICS_CALIBRATION_H_
diff --git a/frc971/vision/intrinsics_calibration_lib.h b/frc971/vision/intrinsics_calibration_lib.h
index 3076ed9..7f08138 100644
--- a/frc971/vision/intrinsics_calibration_lib.h
+++ b/frc971/vision/intrinsics_calibration_lib.h
@@ -16,8 +16,7 @@
#include "aos/util/file.h"
#include "frc971/vision/charuco_lib.h"
-namespace frc971 {
-namespace vision {
+namespace frc971::vision {
class IntrinsicsCalibration {
public:
@@ -76,6 +75,5 @@
aos::ExitHandle *exit_handle_;
};
-} // namespace vision
-} // namespace frc971
+} // namespace frc971::vision
#endif // FRC971_VISION_CALIBRATION_LIB_H_
diff --git a/frc971/vision/media_device.h b/frc971/vision/media_device.h
index a2a86fe..31d0882 100644
--- a/frc971/vision/media_device.h
+++ b/frc971/vision/media_device.h
@@ -16,8 +16,7 @@
#include "aos/scoped/scoped_fd.h"
-namespace frc971 {
-namespace vision {
+namespace frc971::vision {
class MediaDevice;
class Pad;
@@ -254,7 +253,6 @@
// nullopt otherwise.
std::optional<MediaDevice> FindMediaDevice(std::string_view device);
-} // namespace vision
-} // namespace frc971
+} // namespace frc971::vision
#endif // FRC971_VISION_MEDIA_DEVICE_H_
diff --git a/frc971/vision/v4l2_reader.h b/frc971/vision/v4l2_reader.h
index 6338ba5..a3d6252 100644
--- a/frc971/vision/v4l2_reader.h
+++ b/frc971/vision/v4l2_reader.h
@@ -16,8 +16,7 @@
#include "aos/util/threaded_consumer.h"
#include "frc971/vision/vision_generated.h"
-namespace frc971 {
-namespace vision {
+namespace frc971::vision {
// Reads images from a V4L2 capture device (aka camera).
class V4L2ReaderBase {
@@ -199,7 +198,6 @@
aos::util::ThreadedConsumer<int, kNumberBuffers> buffer_requeuer_;
};
-} // namespace vision
-} // namespace frc971
+} // namespace frc971::vision
#endif // FRC971_VISION_V4L2_READER_H_
diff --git a/frc971/vision/visualize_robot.h b/frc971/vision/visualize_robot.h
index c679dba..af2dcef 100644
--- a/frc971/vision/visualize_robot.h
+++ b/frc971/vision/visualize_robot.h
@@ -7,8 +7,7 @@
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
-namespace frc971 {
-namespace vision {
+namespace frc971::vision {
// Helper class to visualize the coordinate frames associated with
// the robot Based on a virtual camera viewpoint, and camera model,
@@ -80,7 +79,6 @@
// DrawFrameAxes
cv::Size default_size_; // Default image size
};
-} // namespace vision
-} // namespace frc971
+} // namespace frc971::vision
#endif // FRC971_VISION_VISUALIZE_ROBOT_H_