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/y2016/control_loops/drivetrain/drivetrain_base.cc b/y2016/control_loops/drivetrain/drivetrain_base.cc
index 1be12ca..208c843 100644
--- a/y2016/control_loops/drivetrain/drivetrain_base.cc
+++ b/y2016/control_loops/drivetrain/drivetrain_base.cc
@@ -14,9 +14,7 @@
namespace chrono = ::std::chrono;
-namespace y2016 {
-namespace control_loops {
-namespace drivetrain {
+namespace y2016::control_loops::drivetrain {
using ::frc971::constants::ShifterHallEffect;
@@ -56,6 +54,4 @@
return kDrivetrainConfig;
};
-} // namespace drivetrain
-} // namespace control_loops
-} // namespace y2016
+} // namespace y2016::control_loops::drivetrain
diff --git a/y2016/control_loops/shooter/shooter.cc b/y2016/control_loops/shooter/shooter.cc
index d317d4f..aeac5a4 100644
--- a/y2016/control_loops/shooter/shooter.cc
+++ b/y2016/control_loops/shooter/shooter.cc
@@ -5,9 +5,7 @@
#include "aos/logging/logging.h"
#include "y2016/control_loops/shooter/shooter_plant.h"
-namespace y2016 {
-namespace control_loops {
-namespace shooter {
+namespace y2016::control_loops::shooter {
namespace chrono = ::std::chrono;
using ::aos::monotonic_clock;
@@ -194,6 +192,4 @@
(void)status->Send(status_builder.Finish());
}
-} // namespace shooter
-} // namespace control_loops
-} // namespace y2016
+} // namespace y2016::control_loops::shooter
diff --git a/y2016/control_loops/shooter/shooter_lib_test.cc b/y2016/control_loops/shooter/shooter_lib_test.cc
index 1a82b9b..a984d26 100644
--- a/y2016/control_loops/shooter/shooter_lib_test.cc
+++ b/y2016/control_loops/shooter/shooter_lib_test.cc
@@ -16,10 +16,7 @@
using ::frc971::control_loops::testing::kTeamNumber;
-namespace y2016 {
-namespace control_loops {
-namespace shooter {
-namespace testing {
+namespace y2016::control_loops::shooter::testing {
namespace chrono = ::std::chrono;
using ::aos::monotonic_clock;
@@ -282,7 +279,4 @@
VerifyNearGoal();
}
-} // namespace testing
-} // namespace shooter
-} // namespace control_loops
-} // namespace y2016
+} // namespace y2016::control_loops::shooter::testing
diff --git a/y2016/control_loops/superstructure/superstructure.cc b/y2016/control_loops/superstructure/superstructure.cc
index 88dfd93..7b69534 100644
--- a/y2016/control_loops/superstructure/superstructure.cc
+++ b/y2016/control_loops/superstructure/superstructure.cc
@@ -8,9 +8,7 @@
#include "y2016/control_loops/superstructure/superstructure_controls.h"
#include "y2016/queues/ball_detector_generated.h"
-namespace y2016 {
-namespace control_loops {
-namespace superstructure {
+namespace y2016::control_loops::superstructure {
namespace {
// The maximum voltage the intake roller will be allowed to use.
@@ -846,6 +844,4 @@
constexpr double Superstructure::kShoulderWristClearAngle;
constexpr double Superstructure::kShoulderTransitionToLanded;
-} // namespace superstructure
-} // namespace control_loops
-} // namespace y2016
+} // namespace y2016::control_loops::superstructure
diff --git a/y2016/control_loops/superstructure/superstructure_controls.cc b/y2016/control_loops/superstructure/superstructure_controls.cc
index ee2020e..32c8b17 100644
--- a/y2016/control_loops/superstructure/superstructure_controls.cc
+++ b/y2016/control_loops/superstructure/superstructure_controls.cc
@@ -5,9 +5,7 @@
#include "y2016/control_loops/superstructure/integral_arm_plant.h"
#include "y2016/control_loops/superstructure/integral_intake_plant.h"
-namespace y2016 {
-namespace control_loops {
-namespace superstructure {
+namespace y2016::control_loops::superstructure {
using ::frc971::PotAndIndexPosition;
@@ -254,6 +252,4 @@
}
}
-} // namespace superstructure
-} // namespace control_loops
-} // namespace y2016
+} // namespace y2016::control_loops::superstructure
diff --git a/y2016/control_loops/superstructure/superstructure_lib_test.cc b/y2016/control_loops/superstructure/superstructure_lib_test.cc
index 9609cd0..ed2f210 100644
--- a/y2016/control_loops/superstructure/superstructure_lib_test.cc
+++ b/y2016/control_loops/superstructure/superstructure_lib_test.cc
@@ -21,10 +21,7 @@
using ::frc971::control_loops::PositionSensorSimulator;
-namespace y2016 {
-namespace control_loops {
-namespace superstructure {
-namespace testing {
+namespace y2016::control_loops::superstructure::testing {
namespace chrono = ::std::chrono;
using ::aos::monotonic_clock;
@@ -1496,7 +1493,4 @@
EXPECT_GE(superstructure_plant_.shoulder_angular_velocity(), 0.55);
}
-} // namespace testing
-} // namespace superstructure
-} // namespace control_loops
-} // namespace y2016
+} // namespace y2016::control_loops::superstructure::testing