Skip to content
This repository was archived by the owner on Nov 6, 2025. It is now read-only.

Commit cf108ce

Browse files
committed
Delete invalid implicit copy constructors and assignment operators
This change serves as a documentation in code, and also allows to build for Windows with rtc_enable_symbol_export, which forces code generation of those constructors and operators.
1 parent ad73985 commit cf108ce

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

api/stats/rtc_stats_report.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#include "api/scoped_refptr.h"
2323
#include "api/stats/rtc_stats.h"
24+
#include "rtc_base/constructor_magic.h"
2425
#include "rtc_base/ref_count.h"
2526
#include "rtc_base/ref_counted_object.h"
2627
#include "rtc_base/system/rtc_export.h"
@@ -60,7 +61,6 @@ class RTC_EXPORT RTCStatsReport : public rtc::RefCountInterface {
6061
static rtc::scoped_refptr<RTCStatsReport> Create(int64_t timestamp_us = 0);
6162

6263
explicit RTCStatsReport(int64_t timestamp_us);
63-
RTCStatsReport(const RTCStatsReport& other) = delete;
6464
rtc::scoped_refptr<RTCStatsReport> Copy() const;
6565

6666
int64_t timestamp_us() const { return timestamp_us_; }
@@ -114,6 +114,8 @@ class RTC_EXPORT RTCStatsReport : public rtc::RefCountInterface {
114114

115115
int64_t timestamp_us_;
116116
StatsMap stats_;
117+
118+
RTC_DISALLOW_COPY_AND_ASSIGN(RTCStatsReport);
117119
};
118120

119121
} // namespace webrtc

media/engine/encoder_simulcast_proxy.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "api/video_codecs/video_encoder.h"
2626
#include "api/video_codecs/video_encoder_factory.h"
2727
#include "modules/video_coding/include/video_codec_interface.h"
28+
#include "rtc_base/constructor_magic.h"
2829
#include "rtc_base/system/rtc_export.h"
2930

3031
namespace webrtc {
@@ -61,6 +62,8 @@ class RTC_EXPORT EncoderSimulcastProxy : public VideoEncoder {
6162
SdpVideoFormat video_format_;
6263
std::unique_ptr<VideoEncoder> encoder_;
6364
EncodedImageCallback* callback_;
65+
66+
RTC_DISALLOW_COPY_AND_ASSIGN(EncoderSimulcastProxy);
6467
};
6568

6669
} // namespace webrtc

media/engine/simulcast_encoder_adapter.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include "api/video_codecs/video_encoder.h"
2525
#include "modules/video_coding/include/video_codec_interface.h"
2626
#include "rtc_base/atomic_ops.h"
27+
#include "rtc_base/constructor_magic.h"
2728
#include "rtc_base/synchronization/sequence_checker.h"
2829
#include "rtc_base/system/rtc_export.h"
2930

@@ -122,6 +123,8 @@ class RTC_EXPORT SimulcastEncoderAdapter : public VideoEncoder {
122123

123124
const absl::optional<unsigned int> experimental_boosted_screenshare_qp_;
124125
const bool boost_base_layer_quality_;
126+
127+
RTC_DISALLOW_COPY_AND_ASSIGN(SimulcastEncoderAdapter);
125128
};
126129

127130
} // namespace webrtc

p2p/base/port_allocator.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include "p2p/base/port.h"
2020
#include "p2p/base/port_interface.h"
21+
#include "rtc_base/constructor_magic.h"
2122
#include "rtc_base/helpers.h"
2223
#include "rtc_base/proxy_info.h"
2324
#include "rtc_base/ssl_certificate.h"
@@ -650,6 +651,8 @@ class RTC_EXPORT PortAllocator : public sigslot::has_slots<> {
650651
// if ice_credentials is nullptr.
651652
std::vector<std::unique_ptr<PortAllocatorSession>>::const_iterator
652653
FindPooledSession(const IceParameters* ice_credentials = nullptr) const;
654+
655+
RTC_DISALLOW_COPY_AND_ASSIGN(PortAllocator);
653656
};
654657

655658
} // namespace cricket

0 commit comments

Comments
 (0)