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/y2016/actors/autonomous_actor.h b/y2016/actors/autonomous_actor.h
index 538322b..2e24638 100644
--- a/y2016/actors/autonomous_actor.h
+++ b/y2016/actors/autonomous_actor.h
@@ -16,8 +16,7 @@
#include "y2016/control_loops/superstructure/superstructure_status_generated.h"
#include "y2016/queues/ball_detector_generated.h"
-namespace y2016 {
-namespace actors {
+namespace y2016::actors {
class AutonomousActor : public ::frc971::autonomous::BaseAutonomousActor {
public:
@@ -100,7 +99,6 @@
superstructure_goal_sender_;
};
-} // namespace actors
-} // namespace y2016
+} // namespace y2016::actors
#endif // Y2016_ACTORS_AUTONOMOUS_ACTOR_H_
diff --git a/y2016/actors/superstructure_actor.h b/y2016/actors/superstructure_actor.h
index f1ae1fe..3f28c7e 100644
--- a/y2016/actors/superstructure_actor.h
+++ b/y2016/actors/superstructure_actor.h
@@ -9,8 +9,7 @@
#include "y2016/control_loops/superstructure/superstructure_goal_generated.h"
#include "y2016/control_loops/superstructure/superstructure_status_generated.h"
-namespace y2016 {
-namespace actors {
+namespace y2016::actors {
class SuperstructureActor
: public ::aos::common::actions::ActorBase<superstructure_action::Goal> {
@@ -46,7 +45,6 @@
bool SuperstructureDone();
};
-} // namespace actors
-} // namespace y2016
+} // namespace y2016::actors
#endif // Y2016_ACTORS_SUPERSTRUCTURE_ACTOR_H_
diff --git a/y2016/actors/vision_align_actor.h b/y2016/actors/vision_align_actor.h
index ac25439..9e604ae 100644
--- a/y2016/actors/vision_align_actor.h
+++ b/y2016/actors/vision_align_actor.h
@@ -10,8 +10,7 @@
#include "y2016/actors/vision_align_action_generated.h"
#include "y2016/vision/vision_generated.h"
-namespace y2016 {
-namespace actors {
+namespace y2016::actors {
class VisionAlignActor
: public ::aos::common::actions::ActorBase<vision_align_action::Goal> {
@@ -34,7 +33,6 @@
drivetrain_goal_sender_;
};
-} // namespace actors
-} // namespace y2016
+} // namespace y2016::actors
#endif
diff --git a/y2016/constants.h b/y2016/constants.h
index f332e37..c3bf681 100644
--- a/y2016/constants.h
+++ b/y2016/constants.h
@@ -7,8 +7,7 @@
#include "frc971/control_loops/state_feedback_loop.h"
#include "frc971/shifter_hall_effect.h"
-namespace y2016 {
-namespace constants {
+namespace y2016::constants {
using ::frc971::constants::PotAndIndexPulseZeroingConstants;
using ::frc971::constants::ShifterHallEffect;
@@ -111,7 +110,6 @@
// them.
const Values &GetValuesForTeam(uint16_t team_number);
-} // namespace constants
-} // namespace y2016
+} // namespace y2016::constants
#endif // Y2016_CONSTANTS_H_
diff --git a/y2016/control_loops/drivetrain/drivetrain_base.h b/y2016/control_loops/drivetrain/drivetrain_base.h
index 0186a6c..b0a4bda 100644
--- a/y2016/control_loops/drivetrain/drivetrain_base.h
+++ b/y2016/control_loops/drivetrain/drivetrain_base.h
@@ -3,15 +3,11 @@
#include "frc971/control_loops/drivetrain/drivetrain_config.h"
-namespace y2016 {
-namespace control_loops {
-namespace drivetrain {
+namespace y2016::control_loops::drivetrain {
const ::frc971::control_loops::drivetrain::DrivetrainConfig<double> &
GetDrivetrainConfig();
-} // namespace drivetrain
-} // namespace control_loops
-} // namespace y2016
+} // namespace y2016::control_loops::drivetrain
#endif // Y2016_CONTROL_LOOPS_DRIVETRAIN_DRIVETRAIN_BASE_H_
diff --git a/y2016/control_loops/shooter/shooter.h b/y2016/control_loops/shooter/shooter.h
index 5aaa1c0..b83ed24 100644
--- a/y2016/control_loops/shooter/shooter.h
+++ b/y2016/control_loops/shooter/shooter.h
@@ -13,9 +13,7 @@
#include "y2016/control_loops/shooter/shooter_position_generated.h"
#include "y2016/control_loops/shooter/shooter_status_generated.h"
-namespace y2016 {
-namespace control_loops {
-namespace shooter {
+namespace y2016::control_loops::shooter {
namespace {
constexpr double kTolerance = 10.0;
@@ -94,8 +92,6 @@
DISALLOW_COPY_AND_ASSIGN(Shooter);
};
-} // namespace shooter
-} // namespace control_loops
-} // namespace y2016
+} // namespace y2016::control_loops::shooter
#endif // Y2016_CONTROL_LOOPS_SHOOTER_SHOOTER_H_
diff --git a/y2016/dashboard/dashboard.h b/y2016/dashboard/dashboard.h
index 9b6414e..5152777 100644
--- a/y2016/dashboard/dashboard.h
+++ b/y2016/dashboard/dashboard.h
@@ -21,8 +21,7 @@
#include "y2016/queues/ball_detector_generated.h"
#include "y2016/vision/vision_generated.h"
-namespace y2016 {
-namespace dashboard {
+namespace y2016::dashboard {
// Dashboard is a webserver that opens a socket and stream data from the robot
// to the client. It is divided between the DataCollector, which polls
@@ -105,7 +104,6 @@
void log(Level level, const char *message) override;
};
-} // namespace dashboard
-} // namespace y2016
+} // namespace y2016::dashboard
#endif // Y2016_DASHBOARD_DASHBOARD_H_
diff --git a/y2016/vision/blob_filters.h b/y2016/vision/blob_filters.h
index 85d2c94..e23c820 100644
--- a/y2016/vision/blob_filters.h
+++ b/y2016/vision/blob_filters.h
@@ -10,8 +10,7 @@
#include "aos/vision/math/segment.h"
#include "aos/vision/math/vector.h"
-namespace aos {
-namespace vision {
+namespace aos::vision {
struct SelectedBlob {
SelectedBlob(const RangeImage &blob_inp) : blob(blob_inp) {}
@@ -196,7 +195,6 @@
ImagePtr *image_ = NULL;
};
-} // namespace vision
-} // namespace aos
+} // namespace aos::vision
#endif // Y2016_VISION_BLOB_FILTERS_H_
diff --git a/y2016/vision/stereo_geometry.h b/y2016/vision/stereo_geometry.h
index c18abc5..e2ed92e 100644
--- a/y2016/vision/stereo_geometry.h
+++ b/y2016/vision/stereo_geometry.h
@@ -7,8 +7,7 @@
#include "aos/vision/math/vector.h"
#include "y2016/vision/calibration.pb.h"
-namespace y2016 {
-namespace vision {
+namespace y2016::vision {
// Returns the contents of the calibration file which are embedded into the
// code.
@@ -61,7 +60,6 @@
Calibration calibration_;
};
-} // namespace vision
-} // namespace y2016
+} // namespace y2016::vision
#endif // Y2016_VISION_STEREO_GEOMETRY_H_