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/jevois/camera/image_stream.h b/y2019/jevois/camera/image_stream.h
index f1ab0af..5b29070 100644
--- a/y2019/jevois/camera/image_stream.h
+++ b/y2019/jevois/camera/image_stream.h
@@ -7,8 +7,7 @@
#include "aos/vision/image/camera_params.pb.h"
#include "y2019/jevois/camera/reader.h"
-namespace y2019 {
-namespace camera {
+namespace y2019::camera {
// Converts a camera reader into a virtual base class that calls ProcessImage
// on each new image.
@@ -48,7 +47,6 @@
std::unique_ptr<Reader> reader_;
};
-} // namespace camera
-} // namespace y2019
+} // namespace y2019::camera
#endif // Y2019_JEVOIS_CAMERA_IMAGE_STREAM_H_
diff --git a/y2019/jevois/camera/reader.h b/y2019/jevois/camera/reader.h
index ef4f34d..77f0799 100644
--- a/y2019/jevois/camera/reader.h
+++ b/y2019/jevois/camera/reader.h
@@ -10,8 +10,7 @@
#include "aos/vision/image/camera_params.pb.h"
#include "aos/vision/image/image_types.h"
-namespace y2019 {
-namespace camera {
+namespace y2019::camera {
aos::vision::CameraParams MakeCameraParams(int32_t width, int32_t height,
int32_t exposure, int32_t brightness,
@@ -65,7 +64,6 @@
aos::vision::CameraParams params_;
};
-} // namespace camera
-} // namespace y2019
+} // namespace y2019::camera
#endif // AOS_VISION_IMAGE_READER_H_
diff --git a/y2019/jevois/cobs.h b/y2019/jevois/cobs.h
index c429622..271a41f 100644
--- a/y2019/jevois/cobs.h
+++ b/y2019/jevois/cobs.h
@@ -11,8 +11,7 @@
// Stuffing data. <http://www.stuartcheshire.org/papers/cobsforton.pdf> has
// details on what this entails and why it's a good idea.
-namespace frc971 {
-namespace jevois {
+namespace frc971::jevois {
constexpr size_t CobsMaxEncodedSize(size_t decoded_size) {
return decoded_size + ((decoded_size + 253) / 254);
@@ -213,7 +212,6 @@
}
}
-} // namespace jevois
-} // namespace frc971
+} // namespace frc971::jevois
#endif // Y2019_JEVOIS_COBS_H_
diff --git a/y2019/jevois/spi.h b/y2019/jevois/spi.h
index 62e5ea7..fd999de 100644
--- a/y2019/jevois/spi.h
+++ b/y2019/jevois/spi.h
@@ -14,8 +14,7 @@
//
// Our SPI transfers are fixed-size to simplify everything.
-namespace frc971 {
-namespace jevois {
+namespace frc971::jevois {
constexpr size_t spi_transfer_size() {
// The teensy->RoboRIO side is way bigger, so just calculate that.
@@ -33,7 +32,6 @@
std::optional<RoborioToTeensy> SpiUnpackToTeensy(
absl::Span<const char> transfer);
-} // namespace jevois
-} // namespace frc971
+} // namespace frc971::jevois
#endif // Y2019_JEVOIS_SPI_H_
diff --git a/y2019/jevois/structures.h b/y2019/jevois/structures.h
index 85cca21..a8d2843 100644
--- a/y2019/jevois/structures.h
+++ b/y2019/jevois/structures.h
@@ -11,8 +11,7 @@
#include "aos/containers/sized_array.h"
#include "aos/time/time.h"
-namespace frc971 {
-namespace jevois {
+namespace frc971::jevois {
// The overall flow to get data to the roboRIO consists of:
// 1. Camera captures a frame and grabs an absolute timestamp.
@@ -233,7 +232,6 @@
CameraCommand camera_command;
};
-} // namespace jevois
-} // namespace frc971
+} // namespace frc971::jevois
#endif // Y2019_JEVOIS_STRUCTURES_H_
diff --git a/y2019/jevois/uart.h b/y2019/jevois/uart.h
index d3eebee..7bacbd1 100644
--- a/y2019/jevois/uart.h
+++ b/y2019/jevois/uart.h
@@ -12,8 +12,7 @@
// This file manages serializing and deserializing the various structures for
// transport via UART.
-namespace frc971 {
-namespace jevois {
+namespace frc971::jevois {
constexpr size_t uart_to_teensy_size() {
return 1 /* number of targets */ +
@@ -38,7 +37,6 @@
std::optional<CameraCalibration> UartUnpackToCamera(
absl::Span<const char> buffer);
-} // namespace jevois
-} // namespace frc971
+} // namespace frc971::jevois
#endif // Y2019_JEVOIS_UART_H_