mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-25 01:41:43 +00:00
Include .h from .inc/.inl files (NFC) (#3017)
This helps both IDEs and linting tools. Also add some missing braces.
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
|
||||
#include "frc/SpeedControllerGroup.h"
|
||||
|
||||
namespace frc {
|
||||
|
||||
template <class... SpeedControllers>
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "frc/shuffleboard/ShuffleboardComponent.h"
|
||||
|
||||
namespace frc {
|
||||
|
||||
template <typename Derived>
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
|
||||
#include <wpi/StringRef.h>
|
||||
|
||||
#include "frc/smartdashboard/SendableChooser.h"
|
||||
|
||||
namespace frc {
|
||||
|
||||
template <class T>
|
||||
@@ -31,8 +33,9 @@ auto SendableChooser<T>::GetSelected()
|
||||
std::string selected = m_defaultChoice;
|
||||
{
|
||||
std::scoped_lock lock(m_mutex);
|
||||
if (m_haveSelected)
|
||||
if (m_haveSelected) {
|
||||
selected = m_selected;
|
||||
}
|
||||
}
|
||||
if (selected.empty()) {
|
||||
return decltype(_unwrap_smart_ptr(m_choices[""])){};
|
||||
@@ -86,8 +89,9 @@ void SendableChooser<T>::InitSendable(SendableBuilder& builder) {
|
||||
std::scoped_lock lock(m_mutex);
|
||||
m_haveSelected = true;
|
||||
m_selected = val;
|
||||
for (auto& entry : m_activeEntries)
|
||||
for (auto& entry : m_activeEntries) {
|
||||
entry.SetString(val);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user