From 9945a5b3c60494b359305edd281cb55a6255cf20 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Thu, 26 Oct 2017 19:28:59 -0700 Subject: [PATCH] Ran formatter (#681) --- .clang-format | 2 +- hal/src/main/native/athena/cpp/SerialHelper.cpp | 2 +- hal/src/main/native/include/HAL/Extensions.h | 2 +- hal/src/main/native/include/MockData/I2CData.h | 2 +- hal/src/main/native/include/MockData/SPIData.h | 2 +- hal/src/main/native/sim/MockData/I2CData.cpp | 2 +- hal/src/main/native/sim/MockData/SPIData.cpp | 2 +- .../src/main/cpp/examples/GearsBot/src/Commands/DriveStraight.h | 2 +- .../main/cpp/examples/GearsBot/src/Commands/SetDistanceToBox.h | 2 +- .../src/main/cpp/examples/GearsBot/src/Subsystems/DriveTrain.h | 2 +- .../src/main/cpp/examples/PacGoat/src/Subsystems/DriveTrain.h | 2 +- .../src/main/cpp/examples/PacGoat/src/Triggers/DoubleButton.h | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.clang-format b/.clang-format index ed38227927..98dfa4e46e 100644 --- a/.clang-format +++ b/.clang-format @@ -72,7 +72,7 @@ PenaltyExcessCharacter: 1000000 PenaltyReturnTypeOnItsOwnLine: 200 PointerAlignment: Left ReflowComments: true -SortIncludes: true +SortIncludes: false SpaceAfterCStyleCast: false SpaceBeforeAssignmentOperators: true SpaceBeforeParens: ControlStatements diff --git a/hal/src/main/native/athena/cpp/SerialHelper.cpp b/hal/src/main/native/athena/cpp/SerialHelper.cpp index 10c2bcf449..31327bdf2e 100644 --- a/hal/src/main/native/athena/cpp/SerialHelper.cpp +++ b/hal/src/main/native/athena/cpp/SerialHelper.cpp @@ -226,7 +226,7 @@ void SerialHelper::QueryHubPaths(int32_t* status) { // Using std::string because this is guarenteed to be large std::string output = ""; - std::shared_ptr pipe(popen(val.c_str(), "r"), pclose); + std::shared_ptr pipe(popen(val.c_str(), "r"), pclose); // Just check the next item on a pipe failure if (!pipe) continue; while (!feof(pipe.get())) { diff --git a/hal/src/main/native/include/HAL/Extensions.h b/hal/src/main/native/include/HAL/Extensions.h index bf35b7b7fe..a3765cbedc 100644 --- a/hal/src/main/native/include/HAL/Extensions.h +++ b/hal/src/main/native/include/HAL/Extensions.h @@ -22,4 +22,4 @@ typedef int halsim_extension_init_func_t(void); extern "C" { int HAL_LoadOneExtension(const char* library); int HAL_LoadExtensions(void); -} +} // extern "C" diff --git a/hal/src/main/native/include/MockData/I2CData.h b/hal/src/main/native/include/MockData/I2CData.h index cc4595393f..524361ea82 100644 --- a/hal/src/main/native/include/MockData/I2CData.h +++ b/hal/src/main/native/include/MockData/I2CData.h @@ -35,5 +35,5 @@ int32_t HALSIM_RegisterI2CWriteCallback(int32_t index, void HALSIM_CancelI2CWriteCallback(int32_t index, int32_t uid); #ifdef __cplusplus -} +} // extern "C" #endif diff --git a/hal/src/main/native/include/MockData/SPIData.h b/hal/src/main/native/include/MockData/SPIData.h index 109cfbf797..ffbe376da5 100644 --- a/hal/src/main/native/include/MockData/SPIData.h +++ b/hal/src/main/native/include/MockData/SPIData.h @@ -48,5 +48,5 @@ void HALSIM_SetSPISetAccumulatorValue(int32_t index, int64_t value); int64_t HALSIM_GetSPIGetAccumulatorValue(int32_t index); #ifdef __cplusplus -} +} // extern "C" #endif diff --git a/hal/src/main/native/sim/MockData/I2CData.cpp b/hal/src/main/native/sim/MockData/I2CData.cpp index 18bd99d2ec..338acf800f 100644 --- a/hal/src/main/native/sim/MockData/I2CData.cpp +++ b/hal/src/main/native/sim/MockData/I2CData.cpp @@ -148,4 +148,4 @@ void HALSIM_CancelI2CWriteCallback(int32_t index, int32_t uid) { SimI2CData[index].CancelWriteCallback(uid); } -} // extern c +} // extern "C" diff --git a/hal/src/main/native/sim/MockData/SPIData.cpp b/hal/src/main/native/sim/MockData/SPIData.cpp index 8ab0aec223..bc0628299c 100644 --- a/hal/src/main/native/sim/MockData/SPIData.cpp +++ b/hal/src/main/native/sim/MockData/SPIData.cpp @@ -244,4 +244,4 @@ int64_t HALSIM_GetSPIGetAccumulatorValue(int32_t index) { return SimSPIData[index].GetAccumulatorValue(); } -} // extern c +} // extern "C" diff --git a/wpilibcExamples/src/main/cpp/examples/GearsBot/src/Commands/DriveStraight.h b/wpilibcExamples/src/main/cpp/examples/GearsBot/src/Commands/DriveStraight.h index f9a01f03f0..3cb3b174e0 100644 --- a/wpilibcExamples/src/main/cpp/examples/GearsBot/src/Commands/DriveStraight.h +++ b/wpilibcExamples/src/main/cpp/examples/GearsBot/src/Commands/DriveStraight.h @@ -13,7 +13,7 @@ namespace frc { class PIDController; -} +} // namespace frc /** * Drive the given distance straight (negative values go backwards). diff --git a/wpilibcExamples/src/main/cpp/examples/GearsBot/src/Commands/SetDistanceToBox.h b/wpilibcExamples/src/main/cpp/examples/GearsBot/src/Commands/SetDistanceToBox.h index 61d565efa7..1751457f40 100644 --- a/wpilibcExamples/src/main/cpp/examples/GearsBot/src/Commands/SetDistanceToBox.h +++ b/wpilibcExamples/src/main/cpp/examples/GearsBot/src/Commands/SetDistanceToBox.h @@ -13,7 +13,7 @@ namespace frc { class PIDController; -} +} // namespace frc /** * Drive until the robot is the given distance away from the box. Uses a local diff --git a/wpilibcExamples/src/main/cpp/examples/GearsBot/src/Subsystems/DriveTrain.h b/wpilibcExamples/src/main/cpp/examples/GearsBot/src/Subsystems/DriveTrain.h index 1e678f82e7..586136d613 100644 --- a/wpilibcExamples/src/main/cpp/examples/GearsBot/src/Subsystems/DriveTrain.h +++ b/wpilibcExamples/src/main/cpp/examples/GearsBot/src/Subsystems/DriveTrain.h @@ -16,7 +16,7 @@ namespace frc { class Joystick; -} +} // namespace frc /** * The DriveTrain subsystem incorporates the sensors and actuators attached to diff --git a/wpilibcExamples/src/main/cpp/examples/PacGoat/src/Subsystems/DriveTrain.h b/wpilibcExamples/src/main/cpp/examples/PacGoat/src/Subsystems/DriveTrain.h index e842bb134f..62bc24c5ab 100644 --- a/wpilibcExamples/src/main/cpp/examples/PacGoat/src/Subsystems/DriveTrain.h +++ b/wpilibcExamples/src/main/cpp/examples/PacGoat/src/Subsystems/DriveTrain.h @@ -17,7 +17,7 @@ namespace frc { class Joystick; -} +} // namespace frc /** * The DriveTrain subsystem controls the robot's chassis and reads in diff --git a/wpilibcExamples/src/main/cpp/examples/PacGoat/src/Triggers/DoubleButton.h b/wpilibcExamples/src/main/cpp/examples/PacGoat/src/Triggers/DoubleButton.h index 3db4700632..b3c074e360 100644 --- a/wpilibcExamples/src/main/cpp/examples/PacGoat/src/Triggers/DoubleButton.h +++ b/wpilibcExamples/src/main/cpp/examples/PacGoat/src/Triggers/DoubleButton.h @@ -11,7 +11,7 @@ namespace frc { class Joystick; -} +} // namespace frc class DoubleButton : public frc::Trigger { public: