Chromium Code Reviews| Index: webrtc/base/buffer.h |
| diff --git a/webrtc/base/buffer.h b/webrtc/base/buffer.h |
| index e9c47ee84e02168b6df52bb5c071613c1c9a9067..658b06e75bb7140f121b1dc602e222025eaa8ce3 100644 |
| --- a/webrtc/base/buffer.h |
| +++ b/webrtc/base/buffer.h |
| @@ -50,7 +50,6 @@ struct ByteType { |
| class Buffer { |
| public: |
| Buffer(); // An empty buffer. |
| - Buffer(const Buffer& buf); // Copy size and contents of an existing buffer. |
| Buffer(Buffer&& buf); // Move contents from an existing buffer. |
| // Construct a buffer with the specified number of uninitialized bytes. |
| @@ -100,12 +99,6 @@ class Buffer { |
| return capacity_; |
| } |
| - Buffer& operator=(const Buffer& buf) { |
| - if (&buf != this) |
| - SetData(buf.data(), buf.size()); |
| - return *this; |
| - } |
| - |
| Buffer& operator=(Buffer&& buf) { |
| RTC_DCHECK(IsConsistent()); |
| RTC_DCHECK(buf.IsConsistent()); |
| @@ -280,6 +273,8 @@ class Buffer { |
| size_t size_; |
| size_t capacity_; |
| std::unique_ptr<uint8_t[]> data_; |
| + |
| + RTC_DISALLOW_COPY_AND_ASSIGN(Buffer); |
|
tommi
2016/03/18 10:54:37
nice!
|
| }; |
| } // namespace rtc |