Remove RTC_DISALLOW_COPY_AND_ASSIGN from rtc_base/

Bug: webrtc:13555, webrtc:13082
Change-Id: I406b7f04497562866ea3329e97c5adc96e927b6f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/245680
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#35691}
This commit is contained in:
Byoungchan Lee
2022-01-12 05:24:58 +09:00
committed by WebRTC LUCI CQ
parent ca15fcd37e
commit 14af7622a7
43 changed files with 203 additions and 151 deletions

View File

@ -18,7 +18,6 @@
#include "rtc_base/buffer.h"
#include "rtc_base/byte_order.h"
#include "rtc_base/constructor_magic.h"
// Reads/Writes from/to buffer using network byte order (big endian)
namespace rtc {
@ -29,6 +28,9 @@ class ByteBufferWriterT {
ByteBufferWriterT() { Construct(nullptr, kDefaultCapacity); }
ByteBufferWriterT(const char* bytes, size_t len) { Construct(bytes, len); }
ByteBufferWriterT(const ByteBufferWriterT&) = delete;
ByteBufferWriterT& operator=(const ByteBufferWriterT&) = delete;
const char* Data() const { return buffer_.data(); }
size_t Length() const { return buffer_.size(); }
size_t Capacity() const { return buffer_.capacity(); }
@ -104,7 +106,6 @@ class ByteBufferWriterT {
// There are sensible ways to define these, but they aren't needed in our code
// base.
RTC_DISALLOW_COPY_AND_ASSIGN(ByteBufferWriterT);
};
class ByteBufferWriter : public ByteBufferWriterT<BufferT<char>> {
@ -112,8 +113,8 @@ class ByteBufferWriter : public ByteBufferWriterT<BufferT<char>> {
ByteBufferWriter();
ByteBufferWriter(const char* bytes, size_t len);
private:
RTC_DISALLOW_COPY_AND_ASSIGN(ByteBufferWriter);
ByteBufferWriter(const ByteBufferWriter&) = delete;
ByteBufferWriter& operator=(const ByteBufferWriter&) = delete;
};
// The ByteBufferReader references the passed data, i.e. the pointer must be
@ -129,6 +130,9 @@ class ByteBufferReader {
explicit ByteBufferReader(const ByteBufferWriter& buf);
ByteBufferReader(const ByteBufferReader&) = delete;
ByteBufferReader& operator=(const ByteBufferReader&) = delete;
// Returns start of unprocessed data.
const char* Data() const { return bytes_ + start_; }
// Returns number of unprocessed bytes.
@ -161,9 +165,6 @@ class ByteBufferReader {
size_t size_;
size_t start_;
size_t end_;
private:
RTC_DISALLOW_COPY_AND_ASSIGN(ByteBufferReader);
};
} // namespace rtc