mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-04 03:11:43 +00:00
[wpilibc] Const-qualify SendableChooser::GetSelected() (#6356)
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user