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/y2023_bot3/control_loops/drivetrain/drivetrain_base.cc b/y2023_bot3/control_loops/drivetrain/drivetrain_base.cc
index 5b30097..481cab0 100644
--- a/y2023_bot3/control_loops/drivetrain/drivetrain_base.cc
+++ b/y2023_bot3/control_loops/drivetrain/drivetrain_base.cc
@@ -15,9 +15,7 @@
namespace chrono = ::std::chrono;
-namespace y2023_bot3 {
-namespace control_loops {
-namespace drivetrain {
+namespace y2023_bot3::control_loops::drivetrain {
using ::frc971::constants::ShifterHallEffect;
@@ -85,6 +83,4 @@
return kDrivetrainConfig;
};
-} // namespace drivetrain
-} // namespace control_loops
-} // namespace y2023_bot3
+} // namespace y2023_bot3::control_loops::drivetrain
diff --git a/y2023_bot3/control_loops/superstructure/superstructure.cc b/y2023_bot3/control_loops/superstructure/superstructure.cc
index e77245e..b730ffa 100644
--- a/y2023_bot3/control_loops/superstructure/superstructure.cc
+++ b/y2023_bot3/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 y2023_bot3 {
-namespace control_loops {
-namespace superstructure {
+namespace y2023_bot3::control_loops::superstructure {
using ::aos::monotonic_clock;
@@ -51,6 +49,4 @@
(void)status->Send(status_builder.Finish());
}
-} // namespace superstructure
-} // namespace control_loops
-} // namespace y2023_bot3
+} // namespace y2023_bot3::control_loops::superstructure
diff --git a/y2023_bot3/control_loops/superstructure/superstructure_lib_test.cc b/y2023_bot3/control_loops/superstructure/superstructure_lib_test.cc
index 370ec17..d9c9d15 100644
--- a/y2023_bot3/control_loops/superstructure/superstructure_lib_test.cc
+++ b/y2023_bot3/control_loops/superstructure/superstructure_lib_test.cc
@@ -16,10 +16,7 @@
DEFINE_string(output_folder, "",
"If set, logs all channels to the provided logfile.");
-namespace y2023_bot3 {
-namespace control_loops {
-namespace superstructure {
-namespace testing {
+namespace y2023_bot3::control_loops::superstructure::testing {
namespace {} // namespace
namespace chrono = std::chrono;
@@ -260,7 +257,4 @@
VerifyNearGoal();
}
-} // namespace testing
-} // namespace superstructure
-} // namespace control_loops
-} // namespace y2023_bot3
+} // namespace y2023_bot3::control_loops::superstructure::testing