mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Remove raw pointer deprecation warnings.
See discussion in 2016 beta forums for rationale. Change-Id: I86a4c1bd61655f4895e2fe0e935f25dc8a89d830
This commit is contained in:
@@ -46,10 +46,6 @@ Counter::Counter(Mode mode) {
|
||||
* @param source A pointer to the existing DigitalSource object. It will be set
|
||||
* as the Up Source.
|
||||
*/
|
||||
DEPRECATED(
|
||||
"Raw pointers are deprecated; if you just want to construct a Counter with "
|
||||
"its own DigitalSource, then call the Counter(int channel). If you want to "
|
||||
"keep your own copy of the DigitalSource, use std::shared_ptr.")
|
||||
Counter::Counter(DigitalSource *source) : Counter(kTwoPulse) {
|
||||
SetUpSource(source);
|
||||
ClearDownSource();
|
||||
@@ -93,8 +89,7 @@ Counter::Counter(int32_t channel) : Counter(kTwoPulse) {
|
||||
* The counter will start counting immediately.
|
||||
* @param trigger The pointer to the existing AnalogTrigger object.
|
||||
*/
|
||||
DEPRECATED(
|
||||
"Raw pointers are deprecated. Use pass-by-reference instead.")
|
||||
DEPRECATED("Use pass-by-reference instead.")
|
||||
Counter::Counter(AnalogTrigger *trigger) : Counter(kTwoPulse) {
|
||||
SetUpSource(trigger->CreateOutput(kState));
|
||||
ClearDownSource();
|
||||
@@ -121,8 +116,6 @@ Counter::Counter(const AnalogTrigger &trigger) : Counter(kTwoPulse) {
|
||||
* @param downSource The pointer to the DigitalSource to set as the down source
|
||||
* @param inverted True to invert the output (reverse the direction)
|
||||
*/
|
||||
DEPRECATED(
|
||||
"Raw pointers are deprecated; prefer to use shared_ptr instead.")
|
||||
Counter::Counter(EncodingType encodingType, DigitalSource *upSource,
|
||||
DigitalSource *downSource, bool inverted)
|
||||
: Counter(encodingType,
|
||||
@@ -193,9 +186,6 @@ void Counter::SetUpSource(int32_t channel) {
|
||||
* @param analogTrigger The analog trigger object that is used for the Up Source
|
||||
* @param triggerType The analog trigger output that will trigger the counter.
|
||||
*/
|
||||
DEPRECATED(
|
||||
"Raw pointers are deprecated; prefer to call either SetUpSource(int) or "
|
||||
"SetUpSource(shared_ptr).")
|
||||
void Counter::SetUpSource(AnalogTrigger *analogTrigger,
|
||||
AnalogTriggerType triggerType) {
|
||||
SetUpSource(std::shared_ptr<AnalogTrigger>(analogTrigger,
|
||||
@@ -232,7 +222,6 @@ void Counter::SetUpSource(std::shared_ptr<DigitalSource> source) {
|
||||
}
|
||||
}
|
||||
|
||||
DEPRECATED("Raw pointers are deprecated. Use std::shared_ptr instead.")
|
||||
void Counter::SetUpSource(DigitalSource *source) {
|
||||
SetUpSource(
|
||||
std::shared_ptr<DigitalSource>(source, NullDeleter<DigitalSource>()));
|
||||
@@ -243,7 +232,6 @@ void Counter::SetUpSource(DigitalSource *source) {
|
||||
* Set the up counting DigitalSource.
|
||||
* @param source Reference to the DigitalSource object to set as the up source
|
||||
*/
|
||||
DEPRECATED("References are deprecated. Use std::shared_ptr instead.")
|
||||
void Counter::SetUpSource(DigitalSource &source) {
|
||||
SetUpSource(
|
||||
std::shared_ptr<DigitalSource>(&source, NullDeleter<DigitalSource>()));
|
||||
@@ -294,9 +282,6 @@ void Counter::SetDownSource(int32_t channel) {
|
||||
* Source
|
||||
* @param triggerType The analog trigger output that will trigger the counter.
|
||||
*/
|
||||
DEPRECATED(
|
||||
"Raw pointers are deprecated; prefer to call either SetUpSource(int) or "
|
||||
"SetUpSource(shared_ptr).")
|
||||
void Counter::SetDownSource(AnalogTrigger *analogTrigger,
|
||||
AnalogTriggerType triggerType) {
|
||||
SetDownSource(std::shared_ptr<AnalogTrigger>(analogTrigger, NullDeleter<AnalogTrigger>()), triggerType);
|
||||
@@ -332,7 +317,6 @@ void Counter::SetDownSource(std::shared_ptr<DigitalSource> source) {
|
||||
}
|
||||
}
|
||||
|
||||
DEPRECATED("Raw pointers are deprecated. Use std::shared_ptr instead.")
|
||||
void Counter::SetDownSource(DigitalSource *source) {
|
||||
SetDownSource(std::shared_ptr<DigitalSource>(source, NullDeleter<DigitalSource>()));
|
||||
}
|
||||
@@ -342,7 +326,6 @@ void Counter::SetDownSource(DigitalSource *source) {
|
||||
* Set the down counting DigitalSource.
|
||||
* @param source Reference to the DigitalSource object to set as the down source
|
||||
*/
|
||||
DEPRECATED("References are deprecated. Use std::shared_ptr instead.")
|
||||
void Counter::SetDownSource(DigitalSource &source) {
|
||||
SetDownSource(std::shared_ptr<DigitalSource>(&source, NullDeleter<DigitalSource>()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user