[wpilibc] Const-qualify SendableChooser::GetSelected() (#6356)

This commit is contained in:
Joseph Eng
2024-02-10 10:42:53 -08:00
committed by GitHub
parent 163f7ee704
commit e506e09a06
3 changed files with 7 additions and 6 deletions

View File

@@ -40,6 +40,8 @@ class SendableChooser : public SendableChooserBase {
static std::weak_ptr<U> _unwrap_smart_ptr(const std::shared_ptr<U>& value);
public:
using CopyType = decltype(_unwrap_smart_ptr(m_choices.lookup("")));
SendableChooser() = default;
~SendableChooser() override = default;
SendableChooser(SendableChooser&& rhs) = default;
@@ -78,7 +80,7 @@ class SendableChooser : public SendableChooserBase {
*
* @return The option selected
*/
auto GetSelected() -> decltype(_unwrap_smart_ptr(m_choices[""]));
CopyType GetSelected() const;
/**
* Bind a listener that's called when the selected value changes.