Replace WPI_DEPRECATED() macro with [[deprecated]] attribute (#5373)

Continue to use WPI_DEPRECATED macro for constructors until clang-format is fixed.
This commit is contained in:
Tyler Veness
2023-06-08 00:01:06 -07:00
committed by GitHub
parent 753cb49a5e
commit 59905ea721
17 changed files with 69 additions and 70 deletions

View File

@@ -7,7 +7,6 @@
#include <memory>
#include <hal/Types.h>
#include <wpi/deprecated.h>
#include <wpi/sendable/Sendable.h>
#include <wpi/sendable/SendableHelper.h>
@@ -168,7 +167,7 @@ class Encoder : public CounterBase,
* @return Period in seconds of the most recent pulse.
* @deprecated Use getRate() in favor of this method.
*/
WPI_DEPRECATED("Use GetRate() in favor of this method")
[[deprecated("Use GetRate() in favor of this method")]]
units::second_t GetPeriod() const override;
/**
@@ -186,9 +185,9 @@ class Encoder : public CounterBase,
* periods and SetMinRate() scales using value from
* SetDistancePerPulse().
*/
WPI_DEPRECATED(
[[deprecated(
"Use SetMinRate() in favor of this method. This takes unscaled periods "
"and SetMinRate() scales using value from SetDistancePerPulse().")
"and SetMinRate() scales using value from SetDistancePerPulse().")]]
void SetMaxPeriod(units::second_t maxPeriod) override;
/**