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:
Tyler Veness
2018-12-24 23:14:24 -08:00
committed by Peter Johnson
parent 799c3ea8a6
commit f3864e9abb
4 changed files with 10 additions and 8 deletions

View File

@@ -19,9 +19,9 @@ namespace frc {
* Live Window Sendable is a special type of object sendable to the live window.
* @deprecated Use Sendable directly instead
*/
class WPI_DEPRECATED("use Sendable directly instead") LiveWindowSendable
: public Sendable {
class LiveWindowSendable : public Sendable {
public:
WPI_DEPRECATED("use Sendable directly instead")
LiveWindowSendable() = default;
LiveWindowSendable(LiveWindowSendable&&) = default;
LiveWindowSendable& operator=(LiveWindowSendable&&) = default;