diff --git a/rtc_base/copy_on_write_buffer.h b/rtc_base/copy_on_write_buffer.h index 68c6ad53d6..87bf625fea 100644 --- a/rtc_base/copy_on_write_buffer.h +++ b/rtc_base/copy_on_write_buffer.h @@ -86,7 +86,7 @@ class RTC_EXPORT CopyOnWriteBuffer { template ::value>::type* = nullptr> - T* data() { + T* MutableData() { RTC_DCHECK(IsConsistent()); if (!buffer_) { return nullptr; @@ -95,6 +95,14 @@ class RTC_EXPORT CopyOnWriteBuffer { return buffer_->data() + offset_; } + // TODO(bugs.webrtc.org/12334): Delete when all usage updated to MutableData() + template ::value>::type* = nullptr> + T* data() { + return MutableData(); + } + // Get const pointer to the data. This will not create a copy of the // underlying data if it is shared with other buffers. template