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/y2022/actors/auto_splines.h b/y2022/actors/auto_splines.h
index 2f5c399..42760e5 100644
--- a/y2022/actors/auto_splines.h
+++ b/y2022/actors/auto_splines.h
@@ -13,8 +13,7 @@
*/
-namespace y2022 {
-namespace actors {
+namespace y2022::actors {
class AutonomousSplines {
public:
@@ -73,7 +72,6 @@
aos::FlatbufferDetachedBuffer<frc971::MultiSpline> spline_two2_;
};
-} // namespace actors
-} // namespace y2022
+} // namespace y2022::actors
#endif // Y2022_ACTORS_AUTO_SPLINES_H_
diff --git a/y2022/actors/autonomous_actor.h b/y2022/actors/autonomous_actor.h
index b36e010..1dfdcdf 100644
--- a/y2022/actors/autonomous_actor.h
+++ b/y2022/actors/autonomous_actor.h
@@ -11,8 +11,7 @@
#include "y2022/control_loops/superstructure/superstructure_goal_generated.h"
#include "y2022/control_loops/superstructure/superstructure_status_generated.h"
-namespace y2022 {
-namespace actors {
+namespace y2022::actors {
using control_loops::superstructure::RequestedIntake;
using frc971::control_loops::StaticZeroingSingleDOFProfiledSubsystemGoal;
@@ -106,7 +105,6 @@
std::optional<Eigen::Vector3d> starting_position_;
};
-} // namespace actors
-} // namespace y2022
+} // namespace y2022::actors
#endif // Y2022_ACTORS_AUTONOMOUS_ACTOR_H_
diff --git a/y2022/constants.h b/y2022/constants.h
index f27b6cd..b89613f 100644
--- a/y2022/constants.h
+++ b/y2022/constants.h
@@ -18,8 +18,7 @@
using ::frc971::shooter_interpolation::InterpolationTable;
-namespace y2022 {
-namespace constants {
+namespace y2022::constants {
constexpr uint16_t kCompTeamNumber = 971;
constexpr uint16_t kPracticeTeamNumber = 9971;
@@ -276,7 +275,6 @@
// Calls MakeValues with aos::network::GetTeamNumber()
Values MakeValues();
-} // namespace constants
-} // namespace y2022
+} // namespace y2022::constants
#endif // Y2022_CONSTANTS_H_
diff --git a/y2022/control_loops/drivetrain/drivetrain_base.h b/y2022/control_loops/drivetrain/drivetrain_base.h
index 1f4cfe4..5568698 100644
--- a/y2022/control_loops/drivetrain/drivetrain_base.h
+++ b/y2022/control_loops/drivetrain/drivetrain_base.h
@@ -3,15 +3,11 @@
#include "frc971/control_loops/drivetrain/drivetrain_config.h"
-namespace y2022 {
-namespace control_loops {
-namespace drivetrain {
+namespace y2022::control_loops::drivetrain {
const ::frc971::control_loops::drivetrain::DrivetrainConfig<double> &
GetDrivetrainConfig();
-} // namespace drivetrain
-} // namespace control_loops
-} // namespace y2022
+} // namespace y2022::control_loops::drivetrain
#endif // Y2022_CONTROL_LOOPS_DRIVETRAIN_DRIVETRAIN_BASE_H_
diff --git a/y2022/control_loops/superstructure/collision_avoidance.h b/y2022/control_loops/superstructure/collision_avoidance.h
index 1d6f89c..034f72f 100644
--- a/y2022/control_loops/superstructure/collision_avoidance.h
+++ b/y2022/control_loops/superstructure/collision_avoidance.h
@@ -8,9 +8,7 @@
#include "y2022/control_loops/superstructure/superstructure_goal_generated.h"
#include "y2022/control_loops/superstructure/superstructure_status_generated.h"
-namespace y2022 {
-namespace control_loops {
-namespace superstructure {
+namespace y2022::control_loops::superstructure {
// Returns the wrapped angle as well as number of wraps (positive or negative).
// The returned angle will be inside [0.0, 2 * M_PI).
@@ -146,8 +144,6 @@
double max_turret_goal_;
};
-} // namespace superstructure
-} // namespace control_loops
-} // namespace y2022
+} // namespace y2022::control_loops::superstructure
#endif
diff --git a/y2022/control_loops/superstructure/superstructure.h b/y2022/control_loops/superstructure/superstructure.h
index 3e10956..f081589 100644
--- a/y2022/control_loops/superstructure/superstructure.h
+++ b/y2022/control_loops/superstructure/superstructure.h
@@ -18,9 +18,7 @@
#include "y2022/control_loops/superstructure/turret/aiming.h"
#include "y2022/vision/ball_color_generated.h"
-namespace y2022 {
-namespace control_loops {
-namespace superstructure {
+namespace y2022::control_loops::superstructure {
class Superstructure
: public ::frc971::controls::ControlLoop<Goal, Position, Status, Output> {
@@ -113,8 +111,6 @@
DISALLOW_COPY_AND_ASSIGN(Superstructure);
};
-} // namespace superstructure
-} // namespace control_loops
-} // namespace y2022
+} // namespace y2022::control_loops::superstructure
#endif // Y2022_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_
diff --git a/y2022/vision/ball_color.h b/y2022/vision/ball_color.h
index 695d2e3..824cf30 100644
--- a/y2022/vision/ball_color.h
+++ b/y2022/vision/ball_color.h
@@ -9,8 +9,7 @@
#include "y2022/constants.h"
#include "y2022/vision/ball_color_generated.h"
-namespace y2022 {
-namespace vision {
+namespace y2022::vision {
using namespace frc971::vision;
@@ -62,6 +61,5 @@
const cv::Rect reference_blue_;
const cv::Rect ball_location_;
};
-} // namespace vision
-} // namespace y2022
+} // namespace y2022::vision
#endif
diff --git a/y2022/vision/blob_detector.h b/y2022/vision/blob_detector.h
index a60316a..93bba09 100644
--- a/y2022/vision/blob_detector.h
+++ b/y2022/vision/blob_detector.h
@@ -4,8 +4,7 @@
#include <opencv2/features2d.hpp>
#include <opencv2/imgproc.hpp>
-namespace y2022 {
-namespace vision {
+namespace y2022::vision {
class BlobDetector {
public:
@@ -52,7 +51,6 @@
static void ExtractBlobs(cv::Mat bgr_image, BlobResult *blob_result);
};
-} // namespace vision
-} // namespace y2022
+} // namespace y2022::vision
#endif // Y2022_BLOB_DETECTOR_H_
diff --git a/y2022/vision/camera_reader.h b/y2022/vision/camera_reader.h
index 8782886..54fcb30 100644
--- a/y2022/vision/camera_reader.h
+++ b/y2022/vision/camera_reader.h
@@ -20,8 +20,7 @@
#include "y2022/vision/target_estimate_generated.h"
#include "y2022/vision/target_estimator.h"
-namespace y2022 {
-namespace vision {
+namespace y2022::vision {
using namespace frc971::vision;
using frc971::controls::LedOutput;
@@ -163,6 +162,5 @@
GPIOControl gpio_disable_control_;
};
-} // namespace vision
-} // namespace y2022
+} // namespace y2022::vision
#endif // Y2022_VISION_CAMERA_READER_H_
diff --git a/y2022/vision/gpio.h b/y2022/vision/gpio.h
index 6ed7328..d7b44d4 100644
--- a/y2022/vision/gpio.h
+++ b/y2022/vision/gpio.h
@@ -14,8 +14,7 @@
#include "aos/init.h"
-namespace y2022 {
-namespace vision {
+namespace y2022::vision {
using namespace frc971::vision;
@@ -353,6 +352,5 @@
aos::TimerHandler *const pwm_timer_;
};
-} // namespace vision
-} // namespace y2022
+} // namespace y2022::vision
#endif // Y2022_VISION_GPIO_H_