mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Remove redundant C++ lambda parentheses (NFC) (#3433)
This commit is contained in:
@@ -295,10 +295,10 @@ void Command::SetSubsystem(std::string_view name) {
|
||||
void Command::InitSendable(SendableBuilder& builder) {
|
||||
builder.SetSmartDashboardType("Command");
|
||||
builder.AddStringProperty(
|
||||
".name", [=]() { return SendableRegistry::GetInstance().GetName(this); },
|
||||
".name", [=] { return SendableRegistry::GetInstance().GetName(this); },
|
||||
nullptr);
|
||||
builder.AddBooleanProperty(
|
||||
"running", [=]() { return IsRunning(); },
|
||||
"running", [=] { return IsRunning(); },
|
||||
[=](bool value) {
|
||||
if (value) {
|
||||
if (!IsRunning()) {
|
||||
@@ -311,5 +311,5 @@ void Command::InitSendable(SendableBuilder& builder) {
|
||||
}
|
||||
});
|
||||
builder.AddBooleanProperty(
|
||||
".isParented", [=]() { return IsParented(); }, nullptr);
|
||||
".isParented", [=] { return IsParented(); }, nullptr);
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ void Scheduler::InitSendable(SendableBuilder& builder) {
|
||||
auto namesEntry = builder.GetEntry("Names");
|
||||
auto idsEntry = builder.GetEntry("Ids");
|
||||
auto cancelEntry = builder.GetEntry("Cancel");
|
||||
builder.SetUpdateTable([=]() {
|
||||
builder.SetUpdateTable([=] {
|
||||
// Get the list of possible commands to cancel
|
||||
auto new_toCancel = cancelEntry.GetValue();
|
||||
wpi::span<const double> toCancel;
|
||||
|
||||
@@ -125,12 +125,12 @@ void Subsystem::InitSendable(SendableBuilder& builder) {
|
||||
builder.SetSmartDashboardType("Subsystem");
|
||||
|
||||
builder.AddBooleanProperty(
|
||||
".hasDefault", [=]() { return m_defaultCommand != nullptr; }, nullptr);
|
||||
".hasDefault", [=] { return m_defaultCommand != nullptr; }, nullptr);
|
||||
builder.AddStringProperty(
|
||||
".default", [=]() { return GetDefaultCommandName(); }, nullptr);
|
||||
".default", [=] { return GetDefaultCommandName(); }, nullptr);
|
||||
|
||||
builder.AddBooleanProperty(
|
||||
".hasCommand", [=]() { return m_currentCommand != nullptr; }, nullptr);
|
||||
".hasCommand", [=] { return m_currentCommand != nullptr; }, nullptr);
|
||||
builder.AddStringProperty(
|
||||
".command", [=]() { return GetCurrentCommandName(); }, nullptr);
|
||||
".command", [=] { return GetCurrentCommandName(); }, nullptr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user