Nest all namespaces

The compiler supports this now.  We can type less going forward.
No functional changes.

Signed-off-by: Stephan Pleines <pleines.stephan@gmail.com>
Change-Id: I29d6fa4f9aacc0e381f1a7637294db0392466995
diff --git a/y2024/autonomous/auto_splines.cc b/y2024/autonomous/auto_splines.cc
index d2bd3a1..5d2c10f 100644
--- a/y2024/autonomous/auto_splines.cc
+++ b/y2024/autonomous/auto_splines.cc
@@ -3,8 +3,7 @@
 #include "aos/flatbuffer_merge.h"
 #include "frc971/control_loops/control_loops_generated.h"
 
-namespace y2024 {
-namespace autonomous {
+namespace y2024::autonomous {
 
 namespace {
 flatbuffers::Offset<frc971::MultiSpline> FixSpline(
@@ -122,5 +121,4 @@
   return FixSpline(builder, multispline_builder.Finish(), alliance);
 }
 
-}  // namespace autonomous
-}  // namespace y2024
+}  // namespace y2024::autonomous
diff --git a/y2024/autonomous/autonomous_actor.cc b/y2024/autonomous/autonomous_actor.cc
index fd42a56..a7c656d 100644
--- a/y2024/autonomous/autonomous_actor.cc
+++ b/y2024/autonomous/autonomous_actor.cc
@@ -13,8 +13,7 @@
 
 DEFINE_bool(spline_auto, false, "Run simple test S-spline auto mode.");
 
-namespace y2024 {
-namespace autonomous {
+namespace y2024::autonomous {
 
 using ::frc971::ProfileParametersT;
 
@@ -192,5 +191,4 @@
     AOS_LOG(ERROR, "Failed to reset localizer.\n");
   }
 }
-}  // namespace autonomous
-}  // namespace y2024
+}  // namespace y2024::autonomous
diff --git a/y2024/constants.cc b/y2024/constants.cc
index cdaf28c..a347353 100644
--- a/y2024/constants.cc
+++ b/y2024/constants.cc
@@ -13,8 +13,7 @@
 #include "aos/mutex/mutex.h"
 #include "aos/network/team_number.h"
 
-namespace y2024 {
-namespace constants {
+namespace y2024::constants {
 
 Values MakeValues(uint16_t team) {
   LOG(INFO) << "creating a Constants for team: " << team;
@@ -46,5 +45,4 @@
 
 Values MakeValues() { return MakeValues(aos::network::GetTeamNumber()); }
 
-}  // namespace constants
-}  // namespace y2024
+}  // namespace y2024::constants
diff --git a/y2024/control_loops/drivetrain/drivetrain_base.cc b/y2024/control_loops/drivetrain/drivetrain_base.cc
index 88b74f9..325dae8 100644
--- a/y2024/control_loops/drivetrain/drivetrain_base.cc
+++ b/y2024/control_loops/drivetrain/drivetrain_base.cc
@@ -15,9 +15,7 @@
 
 namespace chrono = ::std::chrono;
 
-namespace y2024 {
-namespace control_loops {
-namespace drivetrain {
+namespace y2024::control_loops::drivetrain {
 
 using ::frc971::constants::ShifterHallEffect;
 
@@ -85,6 +83,4 @@
   return kDrivetrainConfig;
 };
 
-}  // namespace drivetrain
-}  // namespace control_loops
-}  // namespace y2024
+}  // namespace y2024::control_loops::drivetrain
diff --git a/y2024/control_loops/superstructure/superstructure.cc b/y2024/control_loops/superstructure/superstructure.cc
index abb5536..bb89021 100644
--- a/y2024/control_loops/superstructure/superstructure.cc
+++ b/y2024/control_loops/superstructure/superstructure.cc
@@ -9,9 +9,7 @@
 DEFINE_bool(ignore_distance, false,
             "If true, ignore distance when shooting and obay joystick_reader");
 
-namespace y2024 {
-namespace control_loops {
-namespace superstructure {
+namespace y2024::control_loops::superstructure {
 
 using ::aos::monotonic_clock;
 
@@ -73,6 +71,4 @@
               : 0.0);
 }
 
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2024
\ No newline at end of file
+}  // namespace y2024::control_loops::superstructure
diff --git a/y2024/control_loops/superstructure/superstructure_lib_test.cc b/y2024/control_loops/superstructure/superstructure_lib_test.cc
index 85e16b2..bcda3ae 100644
--- a/y2024/control_loops/superstructure/superstructure_lib_test.cc
+++ b/y2024/control_loops/superstructure/superstructure_lib_test.cc
@@ -17,10 +17,7 @@
 DEFINE_string(output_folder, "",
               "If set, logs all channels to the provided logfile.");
 
-namespace y2024 {
-namespace control_loops {
-namespace superstructure {
-namespace testing {
+namespace y2024::control_loops::superstructure::testing {
 
 namespace chrono = std::chrono;
 
@@ -281,7 +278,4 @@
   RunFor(chrono::seconds(2));
   CheckIfZeroed();
 }
-}  // namespace testing
-}  // namespace superstructure
-}  // namespace control_loops
-}  // namespace y2024
+}  // namespace y2024::control_loops::superstructure::testing
diff --git a/y2024/joystick_reader.cc b/y2024/joystick_reader.cc
index ebc2485..d30e1f5 100644
--- a/y2024/joystick_reader.cc
+++ b/y2024/joystick_reader.cc
@@ -30,9 +30,7 @@
 using frc971::input::driver_station::POVLocation;
 using Side = frc971::control_loops::drivetrain::RobotSide;
 
-namespace y2024 {
-namespace input {
-namespace joysticks {
+namespace y2024::input::joysticks {
 
 class Reader : public ::frc971::input::ActionJoystickInput {
  public:
@@ -68,9 +66,7 @@
       superstructure_status_fetcher_;
 };
 
-}  // namespace joysticks
-}  // namespace input
-}  // namespace y2024
+}  // namespace y2024::input::joysticks
 
 int main(int argc, char **argv) {
   ::aos::InitGoogle(&argc, &argv);
diff --git a/y2024/wpilib_interface.cc b/y2024/wpilib_interface.cc
index 8c1cfd3..94d62ce 100644
--- a/y2024/wpilib_interface.cc
+++ b/y2024/wpilib_interface.cc
@@ -71,8 +71,7 @@
 namespace chrono = ::std::chrono;
 using std::make_unique;
 
-namespace y2024 {
-namespace wpilib {
+namespace y2024::wpilib {
 namespace {
 
 constexpr double kMaxBringupPower = 12.0;
@@ -286,7 +285,6 @@
   }
 };
 
-}  // namespace wpilib
-}  // namespace y2024
+}  // namespace y2024::wpilib
 
 AOS_ROBOT_CLASS(::y2024::wpilib::WPILibRobot);