mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21: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
@@ -39,11 +39,11 @@ AnalogAccelerometer::AnalogAccelerometer(int32_t channel) {
|
||||
* @param channel The existing AnalogInput object for the analog input the
|
||||
* accelerometer is connected to
|
||||
*/
|
||||
[[deprecated(
|
||||
DEPRECATED(
|
||||
"Raw pointers are deprecated; if you just want to construct an "
|
||||
"AnalogAccelerometer with its own AnalogInput, then call the "
|
||||
"AnalogAccelerometer(int channel). If you want to keep your own copy of "
|
||||
"the AnalogInput, use std::shared_ptr.")]]
|
||||
"the AnalogInput, use std::shared_ptr.")
|
||||
AnalogAccelerometer::AnalogAccelerometer(AnalogInput *channel)
|
||||
: m_analogInput(channel, NullDeleter<AnalogInput>()) {
|
||||
if (channel == nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user