mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
Move deprecated message in C++ from class level to constructor (#1505)
This prevents deprecation messages when including a header but not instantiating the class. SampleRobot was addressed by #1503.
This commit is contained in:
committed by
Peter Johnson
parent
799c3ea8a6
commit
f3864e9abb
@@ -20,9 +20,11 @@ namespace frc {
|
||||
* the Smart Dashboard.
|
||||
* @deprecated Use Sendable directly instead
|
||||
*/
|
||||
class WPI_DEPRECATED("use Sendable directly instead") NamedSendable
|
||||
: public Sendable {
|
||||
class NamedSendable : public Sendable {
|
||||
public:
|
||||
WPI_DEPRECATED("use Sendable directly instead")
|
||||
NamedSendable() = default;
|
||||
|
||||
void SetName(const wpi::Twine& name) override;
|
||||
std::string GetSubsystem() const override;
|
||||
void SetSubsystem(const wpi::Twine& subsystem) override;
|
||||
|
||||
Reference in New Issue
Block a user