mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
clang-tidy: modernize-use-default-member-init
This commit is contained in:
@@ -42,7 +42,7 @@ class Frame {
|
||||
};
|
||||
|
||||
public:
|
||||
Frame() noexcept : m_impl{nullptr} {}
|
||||
Frame() noexcept {}
|
||||
|
||||
Frame(SourceImpl& source, const wpi::Twine& error, Time time);
|
||||
|
||||
@@ -231,7 +231,7 @@ class Frame {
|
||||
}
|
||||
void ReleaseFrame();
|
||||
|
||||
Impl* m_impl;
|
||||
Impl* m_impl{nullptr};
|
||||
};
|
||||
|
||||
} // namespace cs
|
||||
|
||||
@@ -48,7 +48,7 @@ class VideoProperty {
|
||||
kEnum = CS_PROP_ENUM
|
||||
};
|
||||
|
||||
VideoProperty() : m_status(0), m_handle(0), m_kind(kNone) {}
|
||||
VideoProperty() {}
|
||||
|
||||
std::string GetName() const;
|
||||
|
||||
@@ -83,9 +83,9 @@ class VideoProperty {
|
||||
explicit VideoProperty(CS_Property handle);
|
||||
VideoProperty(CS_Property handle, Kind kind);
|
||||
|
||||
mutable CS_Status m_status;
|
||||
CS_Property m_handle;
|
||||
Kind m_kind;
|
||||
mutable CS_Status m_status{0};
|
||||
CS_Property m_handle{0};
|
||||
Kind m_kind{kNone};
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -124,7 +124,7 @@ class VideoSource {
|
||||
kConnectionForceClose = CS_CONNECTION_FORCE_CLOSE
|
||||
};
|
||||
|
||||
VideoSource() noexcept : m_handle(0) {}
|
||||
VideoSource() noexcept {}
|
||||
VideoSource(const VideoSource& source);
|
||||
VideoSource(VideoSource&& other) noexcept;
|
||||
VideoSource& operator=(VideoSource other) noexcept;
|
||||
@@ -349,7 +349,7 @@ class VideoSource {
|
||||
explicit VideoSource(CS_Source handle) : m_handle(handle) {}
|
||||
|
||||
mutable CS_Status m_status = 0;
|
||||
CS_Source m_handle;
|
||||
CS_Source m_handle{0};
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -733,7 +733,7 @@ class VideoSink {
|
||||
kCv = CS_SINK_CV
|
||||
};
|
||||
|
||||
VideoSink() noexcept : m_handle(0) {}
|
||||
VideoSink() noexcept {}
|
||||
VideoSink(const VideoSink& sink);
|
||||
VideoSink(VideoSink&& sink) noexcept;
|
||||
VideoSink& operator=(VideoSink other) noexcept;
|
||||
@@ -866,7 +866,7 @@ class VideoSink {
|
||||
explicit VideoSink(CS_Sink handle) : m_handle(handle) {}
|
||||
|
||||
mutable CS_Status m_status = 0;
|
||||
CS_Sink m_handle;
|
||||
CS_Sink m_handle{0};
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1008,7 +1008,7 @@ class VideoEvent : public RawEvent {
|
||||
*/
|
||||
class VideoListener {
|
||||
public:
|
||||
VideoListener() : m_handle(0) {}
|
||||
VideoListener() {}
|
||||
|
||||
/**
|
||||
* Create an event listener.
|
||||
@@ -1033,7 +1033,7 @@ class VideoListener {
|
||||
}
|
||||
|
||||
private:
|
||||
CS_Listener m_handle;
|
||||
CS_Listener m_handle{0};
|
||||
};
|
||||
|
||||
/** @} */
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace cs {
|
||||
|
||||
class UsbCameraBuffer {
|
||||
public:
|
||||
UsbCameraBuffer() noexcept : m_data{nullptr}, m_length{0} {}
|
||||
UsbCameraBuffer() noexcept {}
|
||||
UsbCameraBuffer(UsbCameraBuffer&& other) noexcept : UsbCameraBuffer() {
|
||||
swap(*this, other);
|
||||
}
|
||||
@@ -46,8 +46,8 @@ class UsbCameraBuffer {
|
||||
swap(first.m_length, second.m_length);
|
||||
}
|
||||
|
||||
void* m_data;
|
||||
size_t m_length;
|
||||
void* m_data{nullptr};
|
||||
size_t m_length{0};
|
||||
};
|
||||
|
||||
} // namespace cs
|
||||
|
||||
Reference in New Issue
Block a user