mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
Provide DEPRECATED macro as portable version of [[deprecated]].
The [[deprecated]] attribute is a C++14 feature not supported by MSVC or GCC < 4.9, but can be simulated on both of these compilers through the use of alternative (compiler-specific) attribute methods. Change-Id: I34aed5705db2407c592f7cabd5274358c48d34fe
This commit is contained in:
committed by
Brad Miller (WPI)
parent
ef3fa53fc3
commit
f64b055499
@@ -116,9 +116,9 @@ Ultrasonic::Ultrasonic(uint32_t pingChannel, uint32_t echoChannel,
|
||||
* determine the range.
|
||||
* @param units The units returned in either kInches or kMilliMeters
|
||||
*/
|
||||
[[deprecated(
|
||||
DEPRECATED(
|
||||
"Raw pointers are deprecated; prefer either specifying the channel numbers "
|
||||
"as integers or passing shared_ptrs.")]]
|
||||
"as integers or passing shared_ptrs.")
|
||||
Ultrasonic::Ultrasonic(DigitalOutput *pingChannel, DigitalInput *echoChannel,
|
||||
DistanceUnit units)
|
||||
: m_pingChannel(pingChannel, NullDeleter<DigitalOutput>()),
|
||||
@@ -142,9 +142,9 @@ Ultrasonic::Ultrasonic(DigitalOutput *pingChannel, DigitalInput *echoChannel,
|
||||
* determine the range.
|
||||
* @param units The units returned in either kInches or kMilliMeters
|
||||
*/
|
||||
[[deprecated(
|
||||
DEPRECATED(
|
||||
"References are deprecated; prefer either specifying the channel numbers "
|
||||
"as integers or passing shared_ptrs.")]]
|
||||
"as integers or passing shared_ptrs.")
|
||||
Ultrasonic::Ultrasonic(DigitalOutput &pingChannel, DigitalInput &echoChannel,
|
||||
DistanceUnit units)
|
||||
: m_pingChannel(&pingChannel, NullDeleter<DigitalOutput>()),
|
||||
|
||||
Reference in New Issue
Block a user