mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Move deprecation warning for SampleRobot to constructor (#1503)
This way, the warning doesn't occur when including wpilib.h Closes #1501
This commit is contained in:
committed by
Peter Johnson
parent
ce6f1d0588
commit
b88369f5e8
@@ -13,11 +13,7 @@
|
||||
|
||||
namespace frc {
|
||||
|
||||
class WPI_DEPRECATED(
|
||||
"WARNING: While it may look like a good choice to use for your code if "
|
||||
"you're inexperienced, don't. Unless you know what you are doing, complex "
|
||||
"code will be much more difficult under this system. Use TimedRobot or "
|
||||
"Command-Based instead.") SampleRobot : public RobotBase {
|
||||
class SampleRobot : public RobotBase {
|
||||
public:
|
||||
/**
|
||||
* Start a competition.
|
||||
@@ -95,6 +91,11 @@ class WPI_DEPRECATED(
|
||||
virtual void RobotMain();
|
||||
|
||||
protected:
|
||||
WPI_DEPRECATED(
|
||||
"WARNING: While it may look like a good choice to use for your code if "
|
||||
"you're inexperienced, don't. Unless you know what you are doing, "
|
||||
"complex code will be much more difficult under this system. Use "
|
||||
"TimedRobot or Command-Based instead.")
|
||||
SampleRobot();
|
||||
virtual ~SampleRobot() = default;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user