From f32f592d06a28f2d5d3d2b01c72630523a6256e7 Mon Sep 17 00:00:00 2001 From: Joseph Eng Date: Fri, 9 Feb 2024 20:56:44 -0800 Subject: [PATCH] Remove unusable std::unique_ptr case for SendableChooser --- .../native/include/frc/smartdashboard/SendableChooser.h | 7 ++----- .../native/include/frc/smartdashboard/SendableChooser.inc | 7 ------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/wpilibc/src/main/native/include/frc/smartdashboard/SendableChooser.h b/wpilibc/src/main/native/include/frc/smartdashboard/SendableChooser.h index f06c2524db6..2ca15160d74 100644 --- a/wpilibc/src/main/native/include/frc/smartdashboard/SendableChooser.h +++ b/wpilibc/src/main/native/include/frc/smartdashboard/SendableChooser.h @@ -36,9 +36,6 @@ class SendableChooser : public SendableChooserBase { template static U _unwrap_smart_ptr(const U& value); - template - static U* _unwrap_smart_ptr(const std::unique_ptr& value); - template static std::weak_ptr _unwrap_smart_ptr(const std::shared_ptr& value); @@ -71,8 +68,8 @@ class SendableChooser : public SendableChooserBase { void SetDefaultOption(std::string_view name, T object); /** - * Returns a copy of the selected option (a raw pointer U* if T = - * std::unique_ptr or a std::weak_ptr if T = std::shared_ptr). + * Returns a copy of the selected option (a std::weak_ptr if T = + * std::shared_ptr). * * If there is none selected, it will return the default. If there is none * selected and no default, then it will return a value-initialized instance. diff --git a/wpilibc/src/main/native/include/frc/smartdashboard/SendableChooser.inc b/wpilibc/src/main/native/include/frc/smartdashboard/SendableChooser.inc index e40befdb74b..57f4a1d1182 100644 --- a/wpilibc/src/main/native/include/frc/smartdashboard/SendableChooser.inc +++ b/wpilibc/src/main/native/include/frc/smartdashboard/SendableChooser.inc @@ -121,13 +121,6 @@ U SendableChooser::_unwrap_smart_ptr(const U& value) { return value; } -template - requires std::copy_constructible && std::default_initializable -template -U* SendableChooser::_unwrap_smart_ptr(const std::unique_ptr& value) { - return value.get(); -} - template requires std::copy_constructible && std::default_initializable template