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:
Thad House
2018-12-24 13:46:12 -08:00
committed by Peter Johnson
parent ce6f1d0588
commit b88369f5e8

View File

@@ -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;