mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
Remove raw pointer deprecation warnings.
See discussion in 2016 beta forums for rationale. Change-Id: I86a4c1bd61655f4895e2fe0e935f25dc8a89d830
This commit is contained in:
@@ -54,11 +54,8 @@ ClassName(ClassName &&) = default
|
||||
|
||||
// A struct to use as a deleter when a std::shared_ptr must wrap a raw pointer
|
||||
// that is being deleted by someone else.
|
||||
// This should only be called in deprecated functions; using it anywhere else
|
||||
// will throw warnings.
|
||||
template<class T>
|
||||
struct
|
||||
DEPRECATED("wrapping raw pointer in std::shared_ptr")
|
||||
NullDeleter {
|
||||
void operator()(T *) const noexcept {};
|
||||
};
|
||||
|
||||
@@ -32,18 +32,12 @@ class LiveWindow {
|
||||
public:
|
||||
static LiveWindow *GetInstance();
|
||||
void Run();
|
||||
DEPRECATED(
|
||||
"Raw pointers are deprecated; pass the component using shared_ptr "
|
||||
"instead.")
|
||||
void AddSensor(const std::string &subsystem, const std::string &name,
|
||||
LiveWindowSendable *component);
|
||||
void AddSensor(const std::string &subsystem, const std::string &name,
|
||||
LiveWindowSendable &component);
|
||||
void AddSensor(const std::string &subsystem, const std::string &name,
|
||||
std::shared_ptr<LiveWindowSendable> component);
|
||||
DEPRECATED(
|
||||
"Raw pointers are deprecated; pass the component using shared_ptr "
|
||||
"instead.")
|
||||
void AddActuator(const std::string &subsystem, const std::string &name,
|
||||
LiveWindowSendable *component);
|
||||
void AddActuator(const std::string &subsystem, const std::string &name,
|
||||
@@ -51,9 +45,6 @@ class LiveWindow {
|
||||
void AddActuator(const std::string &subsystem, const std::string &name,
|
||||
std::shared_ptr<LiveWindowSendable> component);
|
||||
|
||||
DEPRECATED(
|
||||
"Raw pointers are deprecated; pass the component using shared_ptr "
|
||||
"instead.")
|
||||
void AddSensor(std::string type, int channel, LiveWindowSendable *component);
|
||||
void AddActuator(std::string type, int channel,
|
||||
LiveWindowSendable *component);
|
||||
|
||||
Reference in New Issue
Block a user