Remove RTC_DISALLOW_COPY_AND_ASSIGN from modules/
Bug: webrtc:13555, webrtc:13082
Change-Id: I2c2cbcbd918f0cfa970c1a964893220ba11d4b41
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/247960
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#35771}
diff --git a/modules/rtp_rtcp/source/rtcp_packet/compound_packet.h b/modules/rtp_rtcp/source/rtcp_packet/compound_packet.h
index 8bee600..d98dbd0 100644
--- a/modules/rtp_rtcp/source/rtcp_packet/compound_packet.h
+++ b/modules/rtp_rtcp/source/rtcp_packet/compound_packet.h
@@ -16,7 +16,6 @@
#include <vector>
#include "modules/rtp_rtcp/source/rtcp_packet.h"
-#include "rtc_base/constructor_magic.h"
namespace webrtc {
namespace rtcp {
@@ -26,6 +25,9 @@
CompoundPacket();
~CompoundPacket() override;
+ CompoundPacket(const CompoundPacket&) = delete;
+ CompoundPacket& operator=(const CompoundPacket&) = delete;
+
void Append(std::unique_ptr<RtcpPacket> packet);
// Size of this packet in bytes (i.e. total size of nested packets).
@@ -38,9 +40,6 @@
protected:
std::vector<std::unique_ptr<RtcpPacket>> appended_packets_;
-
- private:
- RTC_DISALLOW_COPY_AND_ASSIGN(CompoundPacket);
};
} // namespace rtcp
diff --git a/modules/rtp_rtcp/source/rtp_format_h264.h b/modules/rtp_rtcp/source/rtp_format_h264.h
index f658594..283beac 100644
--- a/modules/rtp_rtcp/source/rtp_format_h264.h
+++ b/modules/rtp_rtcp/source/rtp_format_h264.h
@@ -23,7 +23,6 @@
#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
#include "modules/video_coding/codecs/h264/include/h264_globals.h"
#include "rtc_base/buffer.h"
-#include "rtc_base/constructor_magic.h"
namespace webrtc {
@@ -37,6 +36,9 @@
~RtpPacketizerH264() override;
+ RtpPacketizerH264(const RtpPacketizerH264&) = delete;
+ RtpPacketizerH264& operator=(const RtpPacketizerH264&) = delete;
+
size_t NumPackets() const override;
// Get the next payload with H264 payload header.
@@ -82,8 +84,6 @@
size_t num_packets_left_;
std::deque<rtc::ArrayView<const uint8_t>> input_fragments_;
std::queue<PacketUnit> packets_;
-
- RTC_DISALLOW_COPY_AND_ASSIGN(RtpPacketizerH264);
};
} // namespace webrtc
#endif // MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_H264_H_
diff --git a/modules/rtp_rtcp/source/rtp_format_video_generic.h b/modules/rtp_rtcp/source/rtp_format_video_generic.h
index 5acd691..fd44bd1 100644
--- a/modules/rtp_rtcp/source/rtp_format_video_generic.h
+++ b/modules/rtp_rtcp/source/rtp_format_video_generic.h
@@ -16,7 +16,6 @@
#include "api/array_view.h"
#include "modules/rtp_rtcp/source/rtp_format.h"
-#include "rtc_base/constructor_magic.h"
namespace webrtc {
@@ -48,6 +47,9 @@
~RtpPacketizerGeneric() override;
+ RtpPacketizerGeneric(const RtpPacketizerGeneric&) = delete;
+ RtpPacketizerGeneric& operator=(const RtpPacketizerGeneric&) = delete;
+
size_t NumPackets() const override;
// Get the next payload.
@@ -64,8 +66,6 @@
rtc::ArrayView<const uint8_t> remaining_payload_;
std::vector<int> payload_sizes_;
std::vector<int>::const_iterator current_packet_;
-
- RTC_DISALLOW_COPY_AND_ASSIGN(RtpPacketizerGeneric);
};
} // namespace webrtc
#endif // MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_VIDEO_GENERIC_H_
diff --git a/modules/rtp_rtcp/source/rtp_format_vp8.h b/modules/rtp_rtcp/source/rtp_format_vp8.h
index 2100928..d1f569a 100644
--- a/modules/rtp_rtcp/source/rtp_format_vp8.h
+++ b/modules/rtp_rtcp/source/rtp_format_vp8.h
@@ -35,7 +35,6 @@
#include "modules/rtp_rtcp/source/rtp_format.h"
#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
#include "modules/video_coding/codecs/vp8/include/vp8_globals.h"
-#include "rtc_base/constructor_magic.h"
namespace webrtc {
@@ -50,6 +49,9 @@
~RtpPacketizerVp8() override;
+ RtpPacketizerVp8(const RtpPacketizerVp8&) = delete;
+ RtpPacketizerVp8& operator=(const RtpPacketizerVp8&) = delete;
+
size_t NumPackets() const override;
// Get the next payload with VP8 payload header.
@@ -66,8 +68,6 @@
rtc::ArrayView<const uint8_t> remaining_payload_;
std::vector<int> payload_sizes_;
std::vector<int>::const_iterator current_packet_;
-
- RTC_DISALLOW_COPY_AND_ASSIGN(RtpPacketizerVp8);
};
} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/rtp_format_vp8_test_helper.h b/modules/rtp_rtcp/source/rtp_format_vp8_test_helper.h
index 916d657..3ecaa47 100644
--- a/modules/rtp_rtcp/source/rtp_format_vp8_test_helper.h
+++ b/modules/rtp_rtcp/source/rtp_format_vp8_test_helper.h
@@ -21,7 +21,6 @@
#include "modules/rtp_rtcp/source/rtp_format_vp8.h"
#include "modules/video_coding/codecs/vp8/include/vp8_globals.h"
#include "rtc_base/buffer.h"
-#include "rtc_base/constructor_magic.h"
namespace webrtc {
@@ -29,6 +28,10 @@
public:
RtpFormatVp8TestHelper(const RTPVideoHeaderVP8* hdr, size_t payload_len);
~RtpFormatVp8TestHelper();
+
+ RtpFormatVp8TestHelper(const RtpFormatVp8TestHelper&) = delete;
+ RtpFormatVp8TestHelper& operator=(const RtpFormatVp8TestHelper&) = delete;
+
void GetAllPacketsAndCheck(RtpPacketizerVp8* packetizer,
rtc::ArrayView<const size_t> expected_sizes);
@@ -46,8 +49,6 @@
const RTPVideoHeaderVP8* const hdr_info_;
rtc::Buffer payload_;
-
- RTC_DISALLOW_COPY_AND_ASSIGN(RtpFormatVp8TestHelper);
};
} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/rtp_format_vp9.h b/modules/rtp_rtcp/source/rtp_format_vp9.h
index 02458ae..3cf4dd5 100644
--- a/modules/rtp_rtcp/source/rtp_format_vp9.h
+++ b/modules/rtp_rtcp/source/rtp_format_vp9.h
@@ -30,7 +30,6 @@
#include "modules/rtp_rtcp/source/rtp_format.h"
#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
#include "modules/video_coding/codecs/vp9/include/vp9_globals.h"
-#include "rtc_base/constructor_magic.h"
namespace webrtc {
@@ -43,6 +42,9 @@
~RtpPacketizerVp9() override;
+ RtpPacketizerVp9(const RtpPacketizerVp9&) = delete;
+ RtpPacketizerVp9& operator=(const RtpPacketizerVp9&) = delete;
+
size_t NumPackets() const override;
// Gets the next payload with VP9 payload header.
@@ -64,8 +66,6 @@
rtc::ArrayView<const uint8_t> remaining_payload_;
std::vector<int> payload_sizes_;
std::vector<int>::const_iterator current_packet_;
-
- RTC_DISALLOW_COPY_AND_ASSIGN(RtpPacketizerVp9);
};
} // namespace webrtc
diff --git a/modules/rtp_rtcp/source/rtp_rtcp_interface.h b/modules/rtp_rtcp/source/rtp_rtcp_interface.h
index f3cb8d2..a411b23 100644
--- a/modules/rtp_rtcp/source/rtp_rtcp_interface.h
+++ b/modules/rtp_rtcp/source/rtp_rtcp_interface.h
@@ -27,7 +27,6 @@
#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
#include "modules/rtp_rtcp/source/rtp_sequence_number_map.h"
#include "modules/rtp_rtcp/source/video_fec_generator.h"
-#include "rtc_base/constructor_magic.h"
#include "system_wrappers/include/ntp_time.h"
namespace webrtc {
@@ -47,6 +46,9 @@
Configuration() = default;
Configuration(Configuration&& rhs) = default;
+ Configuration(const Configuration&) = delete;
+ Configuration& operator=(const Configuration&) = delete;
+
// True for a audio version of the RTP/RTCP module object false will create
// a video version.
bool audio = false;
@@ -145,9 +147,6 @@
// Estimate RTT as non-sender as described in
// https://tools.ietf.org/html/rfc3611#section-4.4 and #section-4.5
bool non_sender_rtt_measurement = false;
-
- private:
- RTC_DISALLOW_COPY_AND_ASSIGN(Configuration);
};
// Stats for RTCP sender reports (SR) for a specific SSRC.