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/y2019/control_loops/drivetrain/drivetrain_base.h b/y2019/control_loops/drivetrain/drivetrain_base.h
index 3a8bd6b..80aa1a8 100644
--- a/y2019/control_loops/drivetrain/drivetrain_base.h
+++ b/y2019/control_loops/drivetrain/drivetrain_base.h
@@ -3,15 +3,11 @@
#include "frc971/control_loops/drivetrain/drivetrain_config.h"
-namespace y2019 {
-namespace control_loops {
-namespace drivetrain {
+namespace y2019::control_loops::drivetrain {
const ::frc971::control_loops::drivetrain::DrivetrainConfig<double> &
GetDrivetrainConfig();
-} // namespace drivetrain
-} // namespace control_loops
-} // namespace y2019
+} // namespace y2019::control_loops::drivetrain
#endif // Y2019_CONTROL_LOOPS_DRIVETRAIN_DRIVETRAIN_BASE_H_
diff --git a/y2019/control_loops/drivetrain/event_loop_localizer.h b/y2019/control_loops/drivetrain/event_loop_localizer.h
index 0847479..61caf87 100644
--- a/y2019/control_loops/drivetrain/event_loop_localizer.h
+++ b/y2019/control_loops/drivetrain/event_loop_localizer.h
@@ -7,9 +7,7 @@
#include "y2019/control_loops/drivetrain/localizer.h"
#include "y2019/control_loops/drivetrain/target_selector.h"
-namespace y2019 {
-namespace control_loops {
-namespace drivetrain {
+namespace y2019::control_loops::drivetrain {
// Wrap the localizer to allow it to fetch camera frames from the queues.
// TODO(james): Provide a way of resetting the current position and
@@ -89,7 +87,5 @@
::std::array<EventLoopLocalizer::Camera, constants::Values::kNumCameras>
MakeCameras(EventLoopLocalizer::Pose *pose);
-} // namespace drivetrain
-} // namespace control_loops
-} // namespace y2019
+} // namespace y2019::control_loops::drivetrain
#endif // Y2019_CONTROL_LOOPS_DRIVETRAIN_EVENT_LOOP_LOCALIZER_H_
diff --git a/y2019/control_loops/drivetrain/localizer.h b/y2019/control_loops/drivetrain/localizer.h
index 2e7c3a5..f4c7a8a 100644
--- a/y2019/control_loops/drivetrain/localizer.h
+++ b/y2019/control_loops/drivetrain/localizer.h
@@ -17,8 +17,7 @@
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
-namespace y2019 {
-namespace control_loops {
+namespace y2019::control_loops {
template <int num_cameras, int num_targets, int num_obstacles,
int max_targets_per_frame, typename Scalar = double>
@@ -576,7 +575,6 @@
#pragma GCC diagnostic pop
#endif
-} // namespace control_loops
-} // namespace y2019
+} // namespace y2019::control_loops
#endif // Y2019_CONTROL_LOOPS_DRIVETRAIN_LOCALIZATER_H_
diff --git a/y2019/control_loops/drivetrain/target_selector.h b/y2019/control_loops/drivetrain/target_selector.h
index b8d89c7..ba6d970 100644
--- a/y2019/control_loops/drivetrain/target_selector.h
+++ b/y2019/control_loops/drivetrain/target_selector.h
@@ -8,8 +8,7 @@
#include "y2019/control_loops/drivetrain/target_selector_generated.h"
#include "y2019/control_loops/superstructure/superstructure_goal_generated.h"
-namespace y2019 {
-namespace control_loops {
+namespace y2019::control_loops {
// A class to identify which target the driver is currently driving towards so
// that we can guide them into the target.
@@ -75,7 +74,6 @@
drivetrain::SelectionHint target_hint_ = drivetrain::SelectionHint::NONE;
};
-} // namespace control_loops
-} // namespace y2019
+} // namespace y2019::control_loops
#endif // Y2019_CONTROL_LOOPS_DRIVETRAIN_TARGET_SELECTOR_H_
diff --git a/y2019/control_loops/superstructure/collision_avoidance.h b/y2019/control_loops/superstructure/collision_avoidance.h
index ac88cec..e872e8c 100644
--- a/y2019/control_loops/superstructure/collision_avoidance.h
+++ b/y2019/control_loops/superstructure/collision_avoidance.h
@@ -9,9 +9,7 @@
#include "y2019/control_loops/superstructure/superstructure_goal_generated.h"
#include "y2019/control_loops/superstructure/superstructure_status_generated.h"
-namespace y2019 {
-namespace control_loops {
-namespace superstructure {
+namespace y2019::control_loops::superstructure {
// CollisionAvoidance computes the min and max allowable ranges for various
// subsystems to avoid collisions. It also shoves the elevator up to let the
@@ -108,8 +106,6 @@
double max_intake_goal_;
};
-} // namespace superstructure
-} // namespace control_loops
-} // namespace y2019
+} // namespace y2019::control_loops::superstructure
#endif // Y2019_CONTROL_LOOPS_SUPERSTRUCTURE_COLLISION_AVOIDANCE_H_
diff --git a/y2019/control_loops/superstructure/superstructure.h b/y2019/control_loops/superstructure/superstructure.h
index 4d59132..ab80eb4 100644
--- a/y2019/control_loops/superstructure/superstructure.h
+++ b/y2019/control_loops/superstructure/superstructure.h
@@ -16,9 +16,7 @@
#include "y2019/control_loops/superstructure/vacuum.h"
#include "y2019/status_light_generated.h"
-namespace y2019 {
-namespace control_loops {
-namespace superstructure {
+namespace y2019::control_loops::superstructure {
class Superstructure
: public ::frc971::controls::ControlLoop<Goal, Position, Status, Output> {
@@ -68,8 +66,6 @@
DISALLOW_COPY_AND_ASSIGN(Superstructure);
};
-} // namespace superstructure
-} // namespace control_loops
-} // namespace y2019
+} // namespace y2019::control_loops::superstructure
#endif // Y2019_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_
diff --git a/y2019/control_loops/superstructure/vacuum.h b/y2019/control_loops/superstructure/vacuum.h
index c4671ab..58ad109 100644
--- a/y2019/control_loops/superstructure/vacuum.h
+++ b/y2019/control_loops/superstructure/vacuum.h
@@ -7,9 +7,7 @@
#include "y2019/control_loops/superstructure/superstructure_goal_generated.h"
#include "y2019/control_loops/superstructure/superstructure_output_generated.h"
-namespace y2019 {
-namespace control_loops {
-namespace superstructure {
+namespace y2019::control_loops::superstructure {
class Vacuum {
public:
@@ -55,8 +53,6 @@
DISALLOW_COPY_AND_ASSIGN(Vacuum);
};
-} // namespace superstructure
-} // namespace control_loops
-} // namespace y2019
+} // namespace y2019::control_loops::superstructure
#endif // Y2019_CONTROL_LOOPS_SUPERSTRUCTURE_SUPERSTRUCTURE_H_