Upgraded clang-format to 5.0 (#431)

This commit is contained in:
Tyler Veness
2017-11-11 22:09:51 -08:00
committed by Peter Johnson
parent 0001047b8b
commit 0c83cad70c
15 changed files with 96 additions and 67 deletions

View File

@@ -120,8 +120,8 @@ PIDSubsystem::PIDSubsystem(double p, double i, double d, double f,
void PIDSubsystem::Enable() { m_controller->Enable(); }
/**
* Disables the internal {@link PIDController}.
*/
* Disables the internal {@link PIDController}.
*/
void PIDSubsystem::Disable() { m_controller->Disable(); }
/**

View File

@@ -116,8 +116,9 @@ Counter::Counter(const AnalogTrigger& trigger) : Counter(kTwoPulse) {
*/
Counter::Counter(EncodingType encodingType, DigitalSource* upSource,
DigitalSource* downSource, bool inverted)
: Counter(encodingType, std::shared_ptr<DigitalSource>(
upSource, NullDeleter<DigitalSource>()),
: Counter(encodingType,
std::shared_ptr<DigitalSource>(upSource,
NullDeleter<DigitalSource>()),
std::shared_ptr<DigitalSource>(downSource,
NullDeleter<DigitalSource>()),
inverted) {}

View File

@@ -81,10 +81,10 @@ void DigitalOutput::Set(bool value) {
}
/**
* Gets the value being output from the Digital Output.
*
* @return the state of the digital output.
*/
* Gets the value being output from the Digital Output.
*
* @return the state of the digital output.
*/
bool DigitalOutput::Get() const {
if (StatusIsFatal()) return false;

View File

@@ -168,7 +168,7 @@ double InterruptableSensorBase::ReadRisingTimestamp() {
* {@link #DigitalInput.SetUpSourceEdge}
*
* @return Timestamp in seconds since boot.
*/
*/
double InterruptableSensorBase::ReadFallingTimestamp() {
if (StatusIsFatal()) return 0.0;
wpi_assert(m_interrupt != HAL_kInvalidHandle);

View File

@@ -94,8 +94,9 @@ void LiveWindow::AddSensor(const std::string& subsystem,
void LiveWindow::AddSensor(const std::string& subsystem,
const std::string& name,
LiveWindowSendable& component) {
AddSensor(subsystem, name, std::shared_ptr<LiveWindowSendable>(
&component, [](LiveWindowSendable*) {}));
AddSensor(subsystem, name,
std::shared_ptr<LiveWindowSendable>(&component,
[](LiveWindowSendable*) {}));
}
/**
@@ -105,8 +106,9 @@ void LiveWindow::AddSensor(const std::string& subsystem,
void LiveWindow::AddSensor(const std::string& subsystem,
const std::string& name,
LiveWindowSendable* component) {
AddSensor(subsystem, name, std::shared_ptr<LiveWindowSendable>(
component, NullDeleter<LiveWindowSendable>()));
AddSensor(subsystem, name,
std::shared_ptr<LiveWindowSendable>(
component, NullDeleter<LiveWindowSendable>()));
}
//@}
@@ -137,8 +139,9 @@ void LiveWindow::AddActuator(const std::string& subsystem,
void LiveWindow::AddActuator(const std::string& subsystem,
const std::string& name,
LiveWindowSendable& component) {
AddActuator(subsystem, name, std::shared_ptr<LiveWindowSendable>(
&component, [](LiveWindowSendable*) {}));
AddActuator(subsystem, name,
std::shared_ptr<LiveWindowSendable>(&component,
[](LiveWindowSendable*) {}));
}
/**

View File

@@ -27,11 +27,11 @@ void SmartDashboard::init() {
}
/**
* Determines whether the given key is in this table.
*
* @param key the key to search for
* @return true if the table as a value assigned to the given key
*/
* Determines whether the given key is in this table.
*
* @param key the key to search for
* @return true if the table as a value assigned to the given key
*/
bool SmartDashboard::ContainsKey(llvm::StringRef key) {
return s_table->ContainsKey(key);
}
@@ -182,11 +182,11 @@ bool SmartDashboard::PutValue(llvm::StringRef keyName,
}
/**
* Gets the current value in the table, setting it if it does not exist.
* @param key the key
* @param defaultValue the default value to set if key doesn't exist.
* @returns False if the table key exists with a different type
*/
* Gets the current value in the table, setting it if it does not exist.
* @param key the key
* @param defaultValue the default value to set if key doesn't exist.
* @returns False if the table key exists with a different type
*/
bool SmartDashboard::SetDefaultValue(llvm::StringRef key,
std::shared_ptr<nt::Value> defaultValue) {
return s_table->GetEntry(key).SetDefaultValue(defaultValue);
@@ -218,11 +218,11 @@ bool SmartDashboard::PutBoolean(llvm::StringRef keyName, bool value) {
}
/**
* Gets the current value in the table, setting it if it does not exist.
* @param key the key
* @param defaultValue the default value to set if key doesn't exist.
* @returns False if the table key exists with a different type
*/
* Gets the current value in the table, setting it if it does not exist.
* @param key the key
* @param defaultValue the default value to set if key doesn't exist.
* @returns False if the table key exists with a different type
*/
bool SmartDashboard::SetDefaultBoolean(llvm::StringRef key, bool defaultValue) {
return s_table->GetEntry(key).SetDefaultBoolean(defaultValue);
}
@@ -254,11 +254,11 @@ bool SmartDashboard::PutNumber(llvm::StringRef keyName, double value) {
}
/**
* Gets the current value in the table, setting it if it does not exist.
* @param key the key
* @param defaultValue the default value to set if key doesn't exist.
* @returns False if the table key exists with a different type
*/
* Gets the current value in the table, setting it if it does not exist.
* @param key the key
* @param defaultValue the default value to set if key doesn't exist.
* @returns False if the table key exists with a different type
*/
bool SmartDashboard::SetDefaultNumber(llvm::StringRef key,
double defaultValue) {
return s_table->GetEntry(key).SetDefaultDouble(defaultValue);
@@ -315,15 +315,15 @@ std::string SmartDashboard::GetString(llvm::StringRef keyName,
}
/**
* Put a boolean array in the table
* @param key the key to be assigned to
* @param value the value that will be assigned
* @return False if the table key already exists with a different type
*
* @note The array must be of int's rather than of bool's because
* std::vector<bool> is special-cased in C++. 0 is false, any
* non-zero value is true.
*/
* Put a boolean array in the table
* @param key the key to be assigned to
* @param value the value that will be assigned
* @return False if the table key already exists with a different type
*
* @note The array must be of int's rather than of bool's because
* std::vector<bool> is special-cased in C++. 0 is false, any
* non-zero value is true.
*/
bool SmartDashboard::PutBooleanArray(llvm::StringRef key,
llvm::ArrayRef<int> value) {
return s_table->GetEntry(key).SetBooleanArray(value);