mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-02 02:51:42 +00:00
clang-tidy: modernize-use-equals-default
This commit is contained in:
@@ -23,7 +23,7 @@ ConfigurableSourceImpl::ConfigurableSourceImpl(const wpi::Twine& name,
|
||||
m_videoModes.push_back(m_mode);
|
||||
}
|
||||
|
||||
ConfigurableSourceImpl::~ConfigurableSourceImpl() {}
|
||||
ConfigurableSourceImpl::~ConfigurableSourceImpl() = default;
|
||||
|
||||
void ConfigurableSourceImpl::Start() {
|
||||
m_notifier.NotifySource(*this, CS_SOURCE_CONNECTED);
|
||||
|
||||
@@ -24,7 +24,7 @@ CvSourceImpl::CvSourceImpl(const wpi::Twine& name, wpi::Logger& logger,
|
||||
const VideoMode& mode)
|
||||
: ConfigurableSourceImpl{name, logger, notifier, telemetry, mode} {}
|
||||
|
||||
CvSourceImpl::~CvSourceImpl() {}
|
||||
CvSourceImpl::~CvSourceImpl() = default;
|
||||
|
||||
void CvSourceImpl::PutFrame(cv::Mat& image) {
|
||||
// We only support 8-bit images; convert if necessary.
|
||||
|
||||
@@ -42,7 +42,7 @@ class Frame {
|
||||
};
|
||||
|
||||
public:
|
||||
Frame() noexcept {}
|
||||
Frame() noexcept = default;
|
||||
|
||||
Frame(SourceImpl& source, const wpi::Twine& error, Time time);
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ Instance::Instance() : telemetry(notifier), networkListener(logger, notifier) {
|
||||
SetDefaultLogger();
|
||||
}
|
||||
|
||||
Instance::~Instance() {}
|
||||
Instance::~Instance() = default;
|
||||
|
||||
Instance& Instance::GetInstance() {
|
||||
static Instance* inst = new Instance;
|
||||
|
||||
@@ -19,7 +19,7 @@ RawSourceImpl::RawSourceImpl(const wpi::Twine& name, wpi::Logger& logger,
|
||||
const VideoMode& mode)
|
||||
: ConfigurableSourceImpl{name, logger, notifier, telemetry, mode} {}
|
||||
|
||||
RawSourceImpl::~RawSourceImpl() {}
|
||||
RawSourceImpl::~RawSourceImpl() = default;
|
||||
|
||||
void RawSourceImpl::PutFrame(const CS_RawFrame& image) {
|
||||
int type;
|
||||
|
||||
@@ -43,7 +43,7 @@ int64_t Telemetry::Thread::GetValue(CS_Handle handle, CS_TelemetryKind kind,
|
||||
return it->getSecond();
|
||||
}
|
||||
|
||||
Telemetry::~Telemetry() {}
|
||||
Telemetry::~Telemetry() = default;
|
||||
|
||||
void Telemetry::Start() {
|
||||
m_owner.Start(m_notifier);
|
||||
|
||||
@@ -48,7 +48,7 @@ class VideoProperty {
|
||||
kEnum = CS_PROP_ENUM
|
||||
};
|
||||
|
||||
VideoProperty() {}
|
||||
VideoProperty() = default;
|
||||
|
||||
std::string GetName() const;
|
||||
|
||||
@@ -124,7 +124,7 @@ class VideoSource {
|
||||
kConnectionForceClose = CS_CONNECTION_FORCE_CLOSE
|
||||
};
|
||||
|
||||
VideoSource() noexcept {}
|
||||
VideoSource() noexcept = default;
|
||||
VideoSource(const VideoSource& source);
|
||||
VideoSource(VideoSource&& other) noexcept;
|
||||
VideoSource& operator=(VideoSource other) noexcept;
|
||||
@@ -733,7 +733,7 @@ class VideoSink {
|
||||
kCv = CS_SINK_CV
|
||||
};
|
||||
|
||||
VideoSink() noexcept {}
|
||||
VideoSink() noexcept = default;
|
||||
VideoSink(const VideoSink& sink);
|
||||
VideoSink(VideoSink&& sink) noexcept;
|
||||
VideoSink& operator=(VideoSink other) noexcept;
|
||||
@@ -1008,7 +1008,7 @@ class VideoEvent : public RawEvent {
|
||||
*/
|
||||
class VideoListener {
|
||||
public:
|
||||
VideoListener() {}
|
||||
VideoListener() = default;
|
||||
|
||||
/**
|
||||
* Create an event listener.
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace cs {
|
||||
|
||||
class UsbCameraBuffer {
|
||||
public:
|
||||
UsbCameraBuffer() noexcept {}
|
||||
UsbCameraBuffer() noexcept = default;
|
||||
UsbCameraBuffer(UsbCameraBuffer&& other) noexcept : UsbCameraBuffer() {
|
||||
swap(*this, other);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ class NetworkListener::Impl {};
|
||||
|
||||
NetworkListener::NetworkListener(wpi::Logger& logger, Notifier& notifier) {}
|
||||
|
||||
NetworkListener::~NetworkListener() {}
|
||||
NetworkListener::~NetworkListener() = default;
|
||||
|
||||
void NetworkListener::Start() {}
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class SourceReaderCB : public IMFSourceReaderCallback {
|
||||
|
||||
private:
|
||||
// Destructor is private. Caller should call Release.
|
||||
virtual ~SourceReaderCB() {}
|
||||
virtual ~SourceReaderCB() = default;
|
||||
void NotifyError(HRESULT hr);
|
||||
|
||||
ULONG m_nRefCount;
|
||||
|
||||
Reference in New Issue
Block a user