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/frc971/zeroing/absolute_and_absolute_encoder.h b/frc971/zeroing/absolute_and_absolute_encoder.h
index 509d5c5..90c8468 100644
--- a/frc971/zeroing/absolute_and_absolute_encoder.h
+++ b/frc971/zeroing/absolute_and_absolute_encoder.h
@@ -8,8 +8,7 @@
#include "aos/containers/error_list.h"
#include "frc971/zeroing/zeroing.h"
-namespace frc971 {
-namespace zeroing {
+namespace frc971::zeroing {
// Estimates the position with an absolute encoder which also reports
// incremental counts and an absolute encoder that's not allowed to turn more
@@ -113,7 +112,6 @@
double position_ = 0.0;
};
-} // namespace zeroing
-} // namespace frc971
+} // namespace frc971::zeroing
#endif // FRC971_ZEROING_ABSOLUTE_AND_ABSOLUTE_ENCODER_H_
diff --git a/frc971/zeroing/absolute_encoder.h b/frc971/zeroing/absolute_encoder.h
index 9d730f2..b6fd579 100644
--- a/frc971/zeroing/absolute_encoder.h
+++ b/frc971/zeroing/absolute_encoder.h
@@ -8,8 +8,7 @@
#include "aos/containers/error_list.h"
#include "frc971/zeroing/zeroing.h"
-namespace frc971 {
-namespace zeroing {
+namespace frc971::zeroing {
// Estimates the position with an absolute encoder which also reports
// incremental counts. The absolute encoder can't spin more than one
@@ -91,7 +90,6 @@
aos::ErrorList<ZeroingError> errors_;
};
-} // namespace zeroing
-} // namespace frc971
+} // namespace frc971::zeroing
#endif // FRC971_ZEROING_ABSOLUTE_ENCODER_H_
diff --git a/frc971/zeroing/averager.h b/frc971/zeroing/averager.h
index 0e15d13..370533f 100644
--- a/frc971/zeroing/averager.h
+++ b/frc971/zeroing/averager.h
@@ -8,8 +8,7 @@
#include "Eigen/Dense"
#include "glog/logging.h"
-namespace frc971 {
-namespace zeroing {
+namespace frc971::zeroing {
// Averages a set of given numbers. Numbers are given one at a time. Once full
// the average may be requested.
@@ -89,7 +88,6 @@
size_t num_data_points_ = 0;
};
-} // namespace zeroing
-} // namespace frc971
+} // namespace frc971::zeroing
#endif // FRC971_ZEROING_AVERAGER_H_
diff --git a/frc971/zeroing/continuous_absolute_encoder.h b/frc971/zeroing/continuous_absolute_encoder.h
index e11d866..4994280 100644
--- a/frc971/zeroing/continuous_absolute_encoder.h
+++ b/frc971/zeroing/continuous_absolute_encoder.h
@@ -8,8 +8,7 @@
#include "aos/containers/error_list.h"
#include "frc971/zeroing/zeroing.h"
-namespace frc971 {
-namespace zeroing {
+namespace frc971::zeroing {
// Estimates the position with an absolute encoder which spins continuously. The
// absolute encoder must have a 1:1 ratio to the output.
@@ -93,7 +92,6 @@
aos::ErrorList<ZeroingError> errors_;
};
-} // namespace zeroing
-} // namespace frc971
+} // namespace frc971::zeroing
#endif // FRC971_ZEROING_CONTINUOUS_ABSOLUTE_ENCODER_H_
diff --git a/frc971/zeroing/hall_effect_and_position.h b/frc971/zeroing/hall_effect_and_position.h
index f03a442..d9f743f 100644
--- a/frc971/zeroing/hall_effect_and_position.h
+++ b/frc971/zeroing/hall_effect_and_position.h
@@ -5,8 +5,7 @@
#include "frc971/zeroing/zeroing.h"
-namespace frc971 {
-namespace zeroing {
+namespace frc971::zeroing {
// Estimates the position with an incremental encoder and a hall effect sensor.
class HallEffectAndPositionZeroingEstimator
@@ -84,7 +83,6 @@
double first_start_pos_;
};
-} // namespace zeroing
-} // namespace frc971
+} // namespace frc971::zeroing
#endif // FRC971_ZEROING_HALL_EFFECT_AND_POSITION_H_
diff --git a/frc971/zeroing/pot_and_absolute_encoder.h b/frc971/zeroing/pot_and_absolute_encoder.h
index d250a50..f18e589 100644
--- a/frc971/zeroing/pot_and_absolute_encoder.h
+++ b/frc971/zeroing/pot_and_absolute_encoder.h
@@ -8,8 +8,7 @@
#include "aos/containers/error_list.h"
#include "frc971/zeroing/zeroing.h"
-namespace frc971 {
-namespace zeroing {
+namespace frc971::zeroing {
// Estimates the position with an absolute encoder which also reports
// incremental counts, and a potentiometer.
@@ -98,7 +97,6 @@
aos::ErrorList<ZeroingError> errors_;
};
-} // namespace zeroing
-} // namespace frc971
+} // namespace frc971::zeroing
#endif // FRC971_ZEROING_POT_AND_ABSOLUTE_ENCODER_H_
diff --git a/frc971/zeroing/pot_and_index.h b/frc971/zeroing/pot_and_index.h
index 473c674..cb28fe4 100644
--- a/frc971/zeroing/pot_and_index.h
+++ b/frc971/zeroing/pot_and_index.h
@@ -7,8 +7,7 @@
#include "frc971/zeroing/zeroing.h"
-namespace frc971 {
-namespace zeroing {
+namespace frc971::zeroing {
// Estimates the position with an incremental encoder with an index pulse and a
// potentiometer.
@@ -97,7 +96,6 @@
double first_start_pos_;
};
-} // namespace zeroing
-} // namespace frc971
+} // namespace frc971::zeroing
#endif // FRC971_ZEROING_POT_AND_INDEX_H_
diff --git a/frc971/zeroing/pulse_index.h b/frc971/zeroing/pulse_index.h
index 4bcf210..9c17371 100644
--- a/frc971/zeroing/pulse_index.h
+++ b/frc971/zeroing/pulse_index.h
@@ -5,8 +5,7 @@
#include "frc971/zeroing/zeroing.h"
-namespace frc971 {
-namespace zeroing {
+namespace frc971::zeroing {
// Zeros by seeing all the index pulses in the range of motion of the mechanism
// and using that to figure out which index pulse is which.
@@ -78,7 +77,6 @@
double position_;
};
-} // namespace zeroing
-} // namespace frc971
+} // namespace frc971::zeroing
#endif // FRC971_ZEROING_PULSE_INDEX_H_
diff --git a/frc971/zeroing/zeroing.h b/frc971/zeroing/zeroing.h
index 5d5b6eb..8fe381d 100644
--- a/frc971/zeroing/zeroing.h
+++ b/frc971/zeroing/zeroing.h
@@ -20,8 +20,7 @@
// TODO(pschrader): Watch the offset over long periods of time and flag if it
// gets too far away from the initial value.
-namespace frc971 {
-namespace zeroing {
+namespace frc971::zeroing {
template <typename TPosition, typename TZeroingConstants, typename TState>
class ZeroingEstimator {
@@ -169,7 +168,6 @@
bool error_ = false;
};
-} // namespace zeroing
-} // namespace frc971
+} // namespace frc971::zeroing
#endif // FRC971_ZEROING_ZEROING_H_
diff --git a/frc971/zeroing/zeroing_test.h b/frc971/zeroing/zeroing_test.h
index cadbe6c..497f833 100644
--- a/frc971/zeroing/zeroing_test.h
+++ b/frc971/zeroing/zeroing_test.h
@@ -4,9 +4,7 @@
#include "frc971/control_loops/position_sensor_sim.h"
#include "frc971/zeroing/zeroing.h"
-namespace frc971 {
-namespace zeroing {
-namespace testing {
+namespace frc971::zeroing::testing {
using control_loops::PositionSensorSimulator;
using FBB = flatbuffers::FlatBufferBuilder;
@@ -27,6 +25,4 @@
}
};
-} // namespace testing
-} // namespace zeroing
-} // namespace frc971
+} // namespace frc971::zeroing::testing