Run clang-format on the entire repo
This patch clang-formats the entire repo. Third-party code is
excluded.
I needed to fix up the .clang-format file so that all the header
includes are ordered properly. I could have sworn that it used to work
without the extra modification, but I guess not.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: I64bb9f2c795401393f9dfe2fefc4f04cb36b52f6
diff --git a/frc971/wpilib/ahal/Counter.cc b/frc971/wpilib/ahal/Counter.cc
index 8e91c82..5b4ce97 100644
--- a/frc971/wpilib/ahal/Counter.cc
+++ b/frc971/wpilib/ahal/Counter.cc
@@ -7,11 +7,11 @@
#include "frc971/wpilib/ahal/Counter.h"
-#include "hal/HAL.h"
#include "frc971/wpilib/ahal/AnalogTrigger.h"
#include "frc971/wpilib/ahal/Base.h"
#include "frc971/wpilib/ahal/DigitalInput.h"
#include "frc971/wpilib/ahal/WPIErrors.h"
+#include "hal/HAL.h"
using namespace frc;
@@ -31,7 +31,7 @@
ClearDownSource();
}
-Counter::Counter(DigitalSource* source) : Counter(kTwoPulse) {
+Counter::Counter(DigitalSource *source) : Counter(kTwoPulse) {
SetUpSource(source);
ClearDownSource();
}
@@ -41,13 +41,13 @@
ClearDownSource();
}
-Counter::Counter(const AnalogTrigger& trigger) : Counter(kTwoPulse) {
+Counter::Counter(const AnalogTrigger &trigger) : Counter(kTwoPulse) {
SetUpSource(trigger.CreateOutput(AnalogTriggerType::kState));
ClearDownSource();
}
-Counter::Counter(EncodingType encodingType, DigitalSource* upSource,
- DigitalSource* downSource, bool inverted)
+Counter::Counter(EncodingType encodingType, DigitalSource *upSource,
+ DigitalSource *downSource, bool inverted)
: Counter(encodingType,
std::shared_ptr<DigitalSource>(upSource,
NullDeleter<DigitalSource>()),
@@ -96,7 +96,7 @@
SetUpSource(std::make_shared<DigitalInput>(channel));
}
-void Counter::SetUpSource(AnalogTrigger* analogTrigger,
+void Counter::SetUpSource(AnalogTrigger *analogTrigger,
AnalogTriggerType triggerType) {
SetUpSource(std::shared_ptr<AnalogTrigger>(analogTrigger,
NullDeleter<AnalogTrigger>()),
@@ -109,7 +109,7 @@
SetUpSource(analogTrigger->CreateOutput(triggerType));
}
-void Counter::SetUpSource(DigitalSource* source) {
+void Counter::SetUpSource(DigitalSource *source) {
SetUpSource(
std::shared_ptr<DigitalSource>(source, NullDeleter<DigitalSource>()));
}
@@ -125,7 +125,7 @@
HAL_CHECK_STATUS(status);
}
-void Counter::SetUpSource(DigitalSource& source) {
+void Counter::SetUpSource(DigitalSource &source) {
SetUpSource(
std::shared_ptr<DigitalSource>(&source, NullDeleter<DigitalSource>()));
}
@@ -157,7 +157,7 @@
SetDownSource(std::make_shared<DigitalInput>(channel));
}
-void Counter::SetDownSource(AnalogTrigger* analogTrigger,
+void Counter::SetDownSource(AnalogTrigger *analogTrigger,
AnalogTriggerType triggerType) {
SetDownSource(std::shared_ptr<AnalogTrigger>(analogTrigger,
NullDeleter<AnalogTrigger>()),
@@ -170,12 +170,12 @@
SetDownSource(analogTrigger->CreateOutput(triggerType));
}
-void Counter::SetDownSource(DigitalSource* source) {
+void Counter::SetDownSource(DigitalSource *source) {
SetDownSource(
std::shared_ptr<DigitalSource>(source, NullDeleter<DigitalSource>()));
}
-void Counter::SetDownSource(DigitalSource& source) {
+void Counter::SetDownSource(DigitalSource &source) {
SetDownSource(
std::shared_ptr<DigitalSource>(&source, NullDeleter<DigitalSource>()));
}